Promoting the use of Mercurial; was: Re: gnome dvcs survey results
Theodore Tso
tytso at mit.edu
Sat Jan 10 20:58:19 CST 2009
On Sun, Jan 11, 2009 at 12:00:45AM +0100, Arne Babenhauserheide wrote:
>
> hgsubversion goes an easier way which works quite well.
>
> It only creates new changesets for svn, so it has a "converter" from hg
> changesets to svn changesets.
Actually, it goes in both directions; it has to. You can pull new
changesets from the subversion server, which means going from svn->hg,
and then when you push changes back to the subversion server, you're
converting svn->hg.
The big difference though is that subversion's capabilities are a
strict subset of Hg, *and* subversion is not a DSCM, where the client
is substantially simpler than server. In a DSCM, in practice the
client *is* the server. So that means bridging between two DSCM's is
quite different from bridging from an DSCM and a centralized SCM like
svn or CVS.
> If you construct the bridge as a Mercurial extension, then I can
> pull from git and push back my commits into git, but git people
> can't bridge their commits without using Mercurial.
Well, keep in mind that bridge is going to contain roughly the same
amount of git code as Mercurial code, since both are DSCM's. So
whether you call it a "Mercurial extension" or a "git extension" or a
stand-alone program doesn't really make a whole lot of difference.
There will be a command that a Hg or git user will use that will take
a set of commits, and "pull" from them git to hg, and "push" them from
hg to git. The whole point of any DSCM is that "pushing" and
"pulling" are symmetric, right? This is true regardless of whether
you are pushing (or pulling) from one hg repository to another hg
repository, or pushing (or pulling) from one git repository to another
hg repository.... or pushing (or pulling) from a hg repository to a
git repository, or vice versa.
If it makes you feel better that the command parsing is being done via
hg --- sure, whatever. I was actually thinking that the best way to
do the gateway would be via a networked server, which would be
programmed with a set of hg and git repositories that it would
regularly poll, and from which hg and git users could pull from to get
updates.
Even if it's done as a command-line tool, though, the only Mercurial
command "git users" would need would be the command that ran the "hg
bridge" extension. If that makes you feel better, whatever.
- Ted
More information about the Mercurial
mailing list