hg convert -d svn not working (ever), syncing hg with svn

Wujek Srujek wujek.srujek at googlemail.com
Wed May 16 04:35:37 CDT 2012


We seem to be getting closer:

local:~/Playground$ hg convert -d svn test-hg
/home/tester/Playground/svnrepo/test --debug
initializing svn repository 'test'
running: 'svnadmin' 'create' '/home/tester/Playground/svnrepo/test' <
/dev/null
svnadmin: '/home/tester/Playground/svnrepo/test' is a subdirectory of an
existing repository rooted at '/home/tester/Playground/svnrepo'
abort: svnadmin exited with status 256

local:~/Playground$ hg convert -d svn test-hg
/home/tester/Playground/svnrepo --debug
initializing svn working copy 'svnrepo-wc'
running: 'svn' 'checkout' 'file:///home/tester/Playground/svnrepo'
'/home/tester/Playground/svnrepo-wc' < /dev/null
Checked out revision 1.
running: 'svn' 'info' < /dev/null
Path: .
URL: file:///home/tester/Playground/svnrepo
Repository Root: file:///home/tester/Playground/svnrepo
Repository UUID: 639c576b-baac-448c-89db-2f78a8f3e1cb
Revision: 1
Node Kind: directory
Schedule: normal
Last Changed Author: tester
Last Changed Rev: 1
Last Changed Date: 2012-05-16 09:52:38 +0200 (Wed, 16 May 2012)

local:~/Playground$ hg convert -d svn test-hg
/home/local/Playground/svnrepo --debug
initializing svn working copy 'svnrepo-wc'
running: 'svn' 'checkout' 'file:///home/local/Playground/svnrepo'
'/home/local/Playground/svnrepo-wc' < /dev/null
Checked out revision 1.
running: 'svn' 'info' < /dev/null
Path: .
URL: file:///home/local/Playground/svnrepo
Repository Root: file:///home/local/Playground/svnrepo
Repository UUID: 639c576b-baac-448c-89db-2f78a8f3e1cb
Revision: 1
Node Kind: directory
Schedule: normal
Last Changed Author: local
Last Changed Rev: 1
Last Changed Date: 2012-05-16 09:52:38 +0200 (Wed, 16 May 2012)

run hg source pre-conversion action
scanning source...
scanning: 1 revisions
scanning: 2 revisions
sorting...
converting...
1 Initial import.
source: bcc9a201341cc0e8777f3c856ebc0bdfca2d0e42
converting: 0/2 revisions (0.00%)
running: 'svn' 'commit' '--username=local' '--file=/tmp/hg-convert-jcwXM7'
'--encoding=utf-8' < /dev/null
run hg source post-conversion action
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.2+ (default, Oct  4 2011, 20:06:09) [GCC 4.6.1]
** Mercurial Distributed SCM (version 2.2.1)
** Extensions loaded: convert
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
27, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
64, in dispatch
    return _runcatch(req)
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
87, in _runcatch
    return _dispatch(req)
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
685, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
467, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
775, in _runcommand
    return checkargs()
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
746, in checkargs
    return cmdfunc()
  File "/usr/local/lib/python2.7/dist-packages/mercurial/dispatch.py", line
682, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/local/lib/python2.7/dist-packages/mercurial/util.py", line
463, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/hgext/convert/__init__.py",
line 269, in convert
    return convcmd.convert(ui, src, dest, revmapfile, **opts)
  File "/usr/local/lib/python2.7/dist-packages/hgext/convert/convcmd.py",
line 469, in convert
    c.convert(sortmode)
  File "/usr/local/lib/python2.7/dist-packages/hgext/convert/convcmd.py",
line 385, in convert
    self.copy(c)
  File "/usr/local/lib/python2.7/dist-packages/hgext/convert/convcmd.py",
line 353, in copy
    source, self.map)
  File
"/usr/local/lib/python2.7/dist-packages/hgext/convert/subversion.py", line
1223, in putcommit
    return parents[0]
IndexError: list index out of range


I disabled all extensions except for convert.

wujek

On Wed, May 16, 2012 at 10:14 AM, Patrick Mézard <patrick at mezard.eu> wrote:

> Le 16/05/12 09:55, Wujek Srujek a écrit :
> > hg convert -d svn test-hg file:///home/rafal/Playground/svnrepo/test
> --debug
> > initializing svn working copy 'test-wc'
> > running: 'svn' 'checkout'
> > '/home/rafal/Playground/file:/home/rafal/Playground/svnrepo/test'
> > '/home/rafal/Playground/test-wc' < /dev/null
> > svn: '/home/rafal/Playground/file:/home/rafal/Playground/svnrepo/test'
> does
> > not appear to be a URL
> > abort: svn exited with status 256
> >
> > Why would it change the url into a local path?
>
> It expects a path, not a URL. Try:
>
>  hg convert -d svn test-hg /home/rafal/Playground/svnrepo/test --debug
>
> --
> Patrick
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20120516/69f95ab8/attachment.html>


More information about the Mercurial mailing list