Re: Deciding between Git/Mercurial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 30 Sep 2009, Leo Razoumov wrote:
> On 2009-09-29, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
>> On Tue, 29 Sep 2009, Leo Razoumov wrote:
>>> On 2009-09-28, Jakub Narebski <jnareb@xxxxxxxxx> wrote:

>>>> [..snip..]
>>>>  Besides with nonlinear history with
>>>>  revision numbers such as 12678 and 12687 you know that 12678 is older
>>>>  than 12687 if and only if 12678 and 12687 are on the same line of
>>>>  development.
>>>
>>> The statement above is incorrect!! In a Mercurial repo local revision
>>> numbers are strictly ordered in commit time. 12678 < 12687 means that
>>> 12678 was committed prior to 12687. But these two commits could belong
>>> to two completely unrelated lines of development.
>>
>> This is impossible with distributed development.  If the second branch
>>  comes from other repository, with commits _created_ (in that repository)
>>  earlier than commits in current repository, but commits in first
>>  branch (from current repository) were created earlier than _fetching_
>>  those commits in second branch:
>>
>>   .---.---.---.---x---1---2---3---M---.
>>                    \             /
>>                     \-A---B---C-/             <-- from repository B
>>
>>
>>  Either you would have to change commits numbers, and therefore they would
>>  be not stable, or you would have to change commit time to mean 'time this
>>  commit got into current repository', which would kill performance for sure.
> 
> Jakub,
> in Mercurial sequential commit numbers are local to a repo and are not
> unique between the clones. Unique ID is SHA1 as in git. So mercurial
> commit 127:aaf123453dfgdfgddd...
> means commit number 127 in this repo with SHA1 "aaf123453dfgdfgddd..."
> In another clone commit 127 might mean completely different thing.
> Sequential commit numbers are strictly for "local convenience".

Yes, I know that in Mercurial commit numbers are local to repository,
and even written about it (that sequential commit numbers are possible
only either as local identifiers, or in centralized workflow).

The issue I was writing about that sequential commit numbers cannot
tell us if commit was earlier or later than some other commit based
solely on those commit numbers.  As other people in this thread wrote
Mercurial numbers commits not in order of commit creation, but in
order of commit arriving (being present) in given repository.  So
commit numbers are not 'strictly ordered in commit time', but ordered
in 'time commit got into current (local) repository'.


I'd like also to note that this means that at some time Mercurial has
to number all those commit it got on fetch / pull from remote repository.
This can be a lot of work... work which Git doesn't have to do (OTOH Git
creates index for packfile on local side after fetch...).

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]