git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Leo Razoumov <SLONIK.AZ@gmail.com>
Cc: Anteru <newsgroups@catchall.shelter13.net>, git@vger.kernel.org
Subject: Re: Deciding between Git/Mercurial
Date: Wed, 30 Sep 2009 13:09:50 +0200	[thread overview]
Message-ID: <200909301309.51283.jnareb@gmail.com> (raw)
In-Reply-To: <ee2a733e0909291749s71801b29ufa827cab715d0abb@mail.gmail.com>

On Wed, 30 Sep 2009, Leo Razoumov wrote:
> On 2009-09-29, Jakub Narebski <jnareb@gmail.com> wrote:
>> On Tue, 29 Sep 2009, Leo Razoumov wrote:
>>> On 2009-09-28, Jakub Narebski <jnareb@gmail.com> 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

  parent reply	other threads:[~2009-09-30 11:09 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-27 12:24 Deciding between Git/Mercurial Anteru
2009-09-27 18:01 ` Robin Rosenberg
2009-09-27 18:10   ` Anteru
2009-09-27 18:44     ` Alex Riesen
2009-09-27 18:51       ` Mark Struberg
2009-09-27 19:18         ` Anteru
2009-09-27 19:31           ` Alex Riesen
2009-09-27 19:34           ` Erik Faye-Lund
2009-09-27 18:55     ` Pascal Obry
2009-10-22  8:01   ` Martin Langhoff
2009-09-28  8:36 ` Felipe Contreras
2009-09-28  8:42   ` Matthieu Moy
2009-09-28 10:08   ` Johannes Schindelin
2009-09-28 11:01     ` Felipe Contreras
2009-09-28 11:17       ` Bruce Stephens
2009-09-30 11:14     ` Matthias Andree
2009-09-28 11:32 ` Dilip M
2009-09-28 20:54 ` Damien Wyart
2009-09-28 21:09   ` Steven Noonan
2009-09-28 21:33     ` Sverre Rabbelier
2009-09-28 23:56       ` Randal L. Schwartz
2009-09-29  0:01         ` Sverre Rabbelier
2009-09-29  7:44         ` Mike Ralphson
2009-09-29  8:21       ` Matthieu Moy
2009-09-29  8:22         ` Sverre Rabbelier
2009-09-28 23:11 ` Jakub Narebski
2009-09-29  0:32   ` Jakub Narebski
2009-09-29  6:32   ` Anteru
2009-09-29 18:44   ` Leo Razoumov
2009-09-29 18:58     ` Jakub Narebski
2009-09-29 19:55       ` Matthieu Moy
2009-09-30  0:49       ` Leo Razoumov
2009-09-30  6:28         ` Björn Steinbrink
2009-09-30  9:17         ` Andreas Ericsson
2009-09-30 11:09         ` Jakub Narebski [this message]
2009-09-29  1:55 ` Paolo Bonzini
2009-09-29  8:44 ` Daniele Segato
2009-09-29  8:54   ` Dilip M
2009-09-30 11:09 ` Matthias Andree
2009-09-30 22:05   ` Daniel Barkalow
2009-10-22  2:38 ` Dilip M
2009-10-22  6:50   ` Anteru
2009-10-22  7:12     ` Dilip M
2009-10-22  7:35       ` Anteru

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909301309.51283.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=SLONIK.AZ@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newsgroups@catchall.shelter13.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).