All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Anteru <newsgroups@catchall.shelter13.net>
Cc: git@vger.kernel.org
Subject: Re: Deciding between Git/Mercurial
Date: Mon, 28 Sep 2009 16:11:46 -0700 (PDT)	[thread overview]
Message-ID: <m33a66br69.fsf@localhost.localdomain> (raw)
In-Reply-To: <h9nlhj$heq$1@ger.gmane.org>

Anteru <newsgroups@catchall.shelter13.net> writes:

> I'm currently evaluating DVCS for a project, and we're at a point where
> it comes down to either Mercurial or Git. Right now, I'm advocating for
> Git, while my co-workers like Mercurial, so I'd like to provide some
> good arguments in favor of git. Unfortunately, I'm not a git expert, so
> I hope I can get some help here ...
> 
> First of all, what's the matter with git and Windows, is there some
> long-term commitment to make git work on Windows as well as on Linux?
> I'm using msysgit on Windows, and personally I'm happy with it, but my
> co-workers constantly nag that Mercurial has superior portability ...

On one hand side Git relies quite a bit on POSIX features; also some
of git commands are implemented as shell scripts, or are written in
Perl.  Nevertheless even if people stopped working on msysGit
("native" Windows port), which I don't see happening, there is always
and will be git from Cygwin.  But the msysGit team is active, and I
predict that it soon would be full equivalent of Git on Linux (there
are some corner cases yet).  Lately there was even some work on
support infrastructore for having Git be developed in MSVC.

On the other hand side Mercurial does have some parts of its code
rewritten in C for efficiency.  I do wonder how portable it is, and
what is more important how portable is the interface between C and
Python.

But I do not use MS Windows for development, and I do not use
Mercurial...

> Mercurial's revision number system: With git, I get an SHA1 hash for
> every commit, but it's not possible to see whether Hash1 is newer than
> Hash2, while Mecurial also adds a running number to each commit. What's
> the rationale behind this decision for git, and is it possible to
> emulate Mercurial's behavior somehow?

First, you have to remember that this 'number of commit' thingy is
*local* to your repository, so you cannot use commit numbers to
communicate with other developers.  This is inherent and unavoidable
property of 'revision numbering': commit identifiers must be derivable
from commit contents (e.g. SHA-1 used by Git), or must be local to
clone of repository (e.g. Mercurial), or there must be some central
numbering authority (like in centralized SCMs like Subversion).

Second, I think advantages of revision numbering (running number) are
overemphasized.  I don't see how numbers such as 12678 and 12687 are
easier to use than even abbreviated SHA-1 IDs like f06e7eb, never mind
the "<branch>~<n>" syntax Git uses to refer to n-th ancestor of
current tip of given branch.  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.

Third, I think it would be possible to emulate mercurial behaviour
with using lightweight 'number' tags for numbering, created from a
hook.

> Integration into tools: We're using Trac currently, which also has a
> nice binding to Mercurial (well, obviously easy to do as Mercurial is
> written in Python, just as Trac itself), while the git support is in
> development and looks quite alpha'ish. Do you plan to make it easier to
> integrate git with other tools by providing bindings to other languages,
> or is this a low-priority issue?

Well, I think that the problem with implementing bindings to other
programming languages is that there is currently no such thing like
the Git library (well, there are beginnings of one).  This is caused
by the fact that originally git commands were written in run-once
philosophy, and e.g. rely on operating system to do the cleanups.

So far bindings to other languages either call Git commands (like
Git.pm Perl interface from Git, or JavaGit), or are native Git
(re)implementations relying not on stable API, but on stable
repository format (JGit for Java, Dulwich for Python, partially Grit
for Ruby).  

The emphasisis in Git was (and is) for it to be *scriptable*, rather
than extensible through plugins.


BTW. the fact that JGit is reimplementation allows it to be use
different license than Git itself; license which makes JGit and EGit
to be license-compatibile with Eclipse, and allow to distribute EGit
as full Eclipse project.

> 
> So far, my key arguments are that git is more robust (more projects
> using it, larger developer base), of course git's excellent performance
> and the much better support for SVN, which is important for us as we can
> slowly migrate from SVN->Git, while hgmercurial is still in the making
> (and Python's SVN->Hg switch is for instance waiting for it).

hgmercurial? or hgsubversion?

There is also fact that git has superior support for multi-branch
development, which I think is the workflow most suited for distributed
development.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2009-09-28 23:11 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 [this message]
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
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=m33a66br69.fsf@localhost.localdomain \
    --to=jnareb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.