Promoting the use of Mercurial; was: Re: gnome dvcs survey results

Sean Russell ser at germane-software.com
Sun Jan 11 09:02:58 CST 2009


Arne Babenhauserheide wrote:
> Please give hgsubversion a try. 
>
> As long as the svn repository structure uses the basic 
>
> PROJECT
> 	trunk/
> 	branches/
> 	tags/
>
> layout, it can be used as transparent svn bridge. 
>
> -http://www.selenic.com/mercurial/wiki/index.cgi/HgSubversion
>   
Yeah, but there are cases where it fails.  Namely, if branches are 
created in the HG clone (of the SVN repository) then 'hg svn' chokes.  
This means that if you do work in an HG branch that doesn't exist in 
SVN,  then there's no way to get that code back into SVN(1).  Even if 
you merge the work back into a branch that DOES exist in SVN, hg svn 
chokes(2).

hgsubversion is an outstanding extension with a lot of promise, but as 
it clearly says on the wiki page itself, it isn't yet ready for 
production use.


1) That's not entirely true.  'svn rebase' can be used to munge up the 
HG repo; it pulls changes into an existing SVN branch from one that 
doesn't exist in SVN, and removes references to the non-existing one; 
this prevents 'hg svn' from choking, and allows you to push changes to SVN.

2) The trace at the bottom of this message is an example of the sort of 
error that happens with any hg svn command

--- SER

dx325002tp% hg svn outgoing
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version dafcc96c1285)
** Extensions loaded: churn, fetch, convert, extdiff, graphlog, 
transplant, hgk, mq, rebase, svn
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 20, in <module>
    mercurial.dispatch.run()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", 
line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", 
line 29, in dispatch
    return _runcatch(u, args)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", 
line 45, in _runcatch
    return _dispatch(ui, args)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", 
line 367, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", 
line 416, in _runcommand
    return checkargs()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", 
line 376, in checkargs
    return cmdfunc()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", 
line 361, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/local/lib/python2.5/site-packages/mercurial/util.py", line 
715, in check
    return func(*args, **kwargs)
  File "/home/srussell/hgsubversion/__init__.py", line 19, in svn
    return svncommand.svncmd(ui, repo, subcommand, *args, **opts)
  File "/home/srussell/hgsubversion/svncommand.py", line 42, in svncmd
    **opts)
  File "/home/srussell/hgsubversion/utility_commands.py", line 141, in 
show_outgoing_to_svn
    o_r = util.outgoing_revisions(ui, repo, hge, svn_commit_hashes, 
repo.parents()[0].node())
  File "/home/srussell/hgsubversion/util.py", line 84, in outgoing_revisions
    assert len(sourcerev) == 1
AssertionError


More information about the Mercurial mailing list