git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: git@vger.kernel.org
Subject: Re: Git/Mercurial interoperability (and what about bzr?)
Date: Sat, 01 Nov 2008 03:33:43 -0700 (PDT)	[thread overview]
Message-ID: <m3prlffzk2.fsf@localhost.localdomain> (raw)
In-Reply-To: <87ljw3zx8i.fsf@mid.deneb.enyo.de>

Florian Weimer <fw@deneb.enyo.de> writes:
> * Theodore Tso:
> 
> > In the past I've looked at the possibility of creating a
> > bi-directional, incremental gateway between hg and git repositories.
> > The main thing which makes this difficult is that hg stores tags
> > in-band inside the change-controlled .hgtags file.  This means that if
> > you cut a release, tag it, and then create a commit to further modify
> > the repository, the new commit is descended from the tag commit,
> > whereas in git, the tag is a "bookmark" --- perhaps signed via GPG,
> > but not part of the revision history.
> 
> Couldn't you just keep the .hgtags file and have everyone interested
> in the tags use special scripts?
> 
> (Admittedly, I'm horribly totally by Git's behavior in this area.  I
> haven't figured out yet under what circumstances tags are pushed and
> pulled, so I'm not totally opposed to the Mercurial model. 8-/)

I think you don't understand the issue here.

First, I think that we all agree here that by definition tags should
named reference (for example 'v1.0' or '1.0') to some immutable
snapshot of a state of repository, so for example when somebody says
'v1.0' everybody knows what it is.  In Git tags are immutable (you
can't checkout a tag, you can only checkout state pointed by tag)
external pointers to commits in the DAG (graph) of revisions.

Global tags (tags used to mark releases like 'v1.0') have to _not
versioned_ and _transferable_.  Transferable (global) because we want
to know for example what 'v1.0' version was in each clone / each
repository.  Non-versioned because we want to have the same set of
tags independent on what branch we are (when we are on 'master', we
want to be able to know about 'v1.0.1' which is on 'maint'), and what
revision we have checked out (for example during bisection, we want to
be able to compare to 'v1.0' even if we have checked out revision
which is earlier than 'v1.0').

Do you agree that global tags should be both non-versioned and
trasferable?

Now Mercurial has chosen to use in-tree '.hgtags' file to have global
tags transferable.  Never mind the fact that it had to treat this file
in special way to have it non-versioned (as opposed to for example
.*ignore file, which should be both transferable and versioned); the
fact that in-tree file is used means that tag is visible to outside
(transferable) only after you commit changes in .hgtags file.

In Git tags are external to object database; they reside in
refs/tags/* namespace.  They are of course non-versioned, as not being
in-tree.  In default configuration however (from what I understand) if
you transfer (get) some tagged commit, you also get a tag that points
to transferred commit.  You don't need to create "PROJECT 1.0" (or
"Tagged v1.0") commit to make tag visible to outside.


In short, if you want to have bi-directional gateway between Mercurial
and Git, Git has to be limited:
 * no octopus merges (with more than two parents)
 * always create 'tagging commits' (bump version number for example)
   for tagging purposes on Mercurial side.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2008-11-01 10:35 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-26  4:28 [VOTE] git versus mercurial walt
2008-10-26 14:15 ` [VOTE] git versus mercurial (for DragonflyBSD) Jakub Narebski
2008-10-26 14:30   ` Maxim Vuets
2008-10-26 15:05     ` Leo Razoumov
2008-10-26 18:55       ` Jakub Narebski
2008-10-27  0:20         ` Arne Babenhauserheide
2008-10-27  4:15           ` Leo Razoumov
2008-10-27  7:16             ` Arne Babenhauserheide
2008-10-27  7:16             ` dhruva
2008-10-27  0:47         ` Arne Babenhauserheide
2008-10-27  1:52           ` Jakub Narebski
2008-10-27  7:50             ` Arne Babenhauserheide
2008-10-27  9:41               ` Jakub Narebski
2008-10-27 10:12                 ` Leslie P. Polzer
2008-10-27 10:14                 ` Arne Babenhauserheide
2008-10-27 12:48                   ` Jakub Narebski
     [not found]                     ` <200810271512.26352.arne_bab@web.de>
2008-10-27 18:01                       ` Jakub Narebski
2008-10-27 20:48                         ` Arne Babenhauserheide
2008-10-27 21:07                           ` Miklos Vajna
2008-10-27 21:30                             ` Arne Babenhauserheide
2008-10-28  0:13                               ` Miklos Vajna
2008-10-28 17:48                               ` Andreas Ericsson
2008-10-28 19:11                                 ` Arne Babenhauserheide
2008-10-28 19:38                                   ` SZEDER Gábor
2008-11-06 16:25                                     ` Marcin Kasperski
2008-11-06 17:41                                       ` Isaac Jurado
2008-10-28 19:16                                 ` Randal L. Schwartz
2008-10-27 23:25                           ` Jakub Narebski
2008-10-27  9:29             ` Benoit Boissinot
2008-10-27 10:57               ` Jakub Narebski
2008-10-27 14:29                 ` 0000 vk
2008-10-27 14:57                   ` Jakub Narebski
     [not found]             ` <1225100597.31813.11.camel@abelardo.lan>
2008-10-27 11:42               ` David Soria Parra
2008-10-27 20:07             ` Brandon Casey
2008-10-27 20:37               ` Jakub Narebski
2008-10-28  1:28                 ` Nicolas Pitre
2008-10-26 15:57   ` Felipe Contreras
2008-10-26 19:07     ` Jakub Narebski
2008-10-26 19:54       ` Felipe Contreras
2008-10-28 12:31 ` [VOTE] git versus mercurial walt
2008-10-28 14:28   ` Johannes Schindelin
2008-10-28 14:41     ` Git/Mercurial interoperability (and what about bzr?) (was: Re: [VOTE] git versus mercurial) Peter Krefting
2008-10-28 14:59       ` Johannes Schindelin
2008-10-28 15:02         ` Git/Mercurial interoperability (and what about bzr?) Matthieu Moy
2008-10-28 15:03       ` Git/Mercurial interoperability (and what about bzr?) (was: Re: [VOTE] git versus mercurial) Nicolas Pitre
2008-10-28 15:33       ` Pieter de Bie
2008-10-28 19:12         ` Miklos Vajna
2008-10-28 21:10           ` Miklos Vajna
2008-10-28 21:31           ` Theodore Tso
2008-10-28 23:28             ` Miklos Vajna
2008-11-01  8:06             ` Git/Mercurial interoperability (and what about bzr?) Florian Weimer
2008-11-01 10:03               ` Santi Béjar
2008-11-01 10:33               ` Jakub Narebski [this message]
2008-11-01 10:44                 ` Florian Weimer
2008-11-01 11:10                   ` Florian Weimer
2008-11-01 12:26                   ` Jakub Narebski
2008-11-01 13:39                   ` Theodore Tso
2008-11-01 17:51                     ` Linus Torvalds
2008-11-02  1:13                       ` Theodore Tso
2008-11-01 10:16         ` Git/Mercurial interoperability (and what about bzr?) (was: Re: [VOTE] git versus mercurial) Peter Krefting
2008-10-29 19:11     ` [VOTE] git versus mercurial Shawn O. Pearce
2008-10-29 19:36       ` Boyd Lynn Gerber
2008-10-29 19:48         ` Johannes Schindelin
2008-10-29 19:51           ` Boyd Lynn Gerber
2008-10-29  8:15   ` Miles Bader

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=m3prlffzk2.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=fw@deneb.enyo.de \
    --cc=git@vger.kernel.org \
    /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).