I'm studiyng Mercurial but I don't understand how it detects the file conflicts.
When a centralized SCM (as SubVersion) detects a conflit between two versions of a file in my project, it means the version number of mine local file is minor then version number of same file in the remote repository, because another developer (p.e. John Smith) has committed before me (by the same initial version number).
In a decentralized SCM (Mercurial, Git, etc), I haven't a central repository, then:
- I clone a repository, downloading a number version A of file from the remote server;
- John Smith clones the same repository, downloading the same number version A of file from the remote server;
- John Smith codes a little and commit in him local;
- After, I commit in mine local;
How Git understands that our files are direct descendant from number version A? The Mercurial/Git/Bazaar/etc has'nt an internal number what identifies: how they understand when a modified file is in conflict or not?