[issue3251] hg convert fails with empty trunk if other branches exist

A. Budden bugs at mercurial.selenic.com
Mon Feb 6 12:58:02 UTC 2012


New submission from A. Budden <abudden+MERCURIAL at gmail.com>:

This is subtly different from issue 3233:

bzr init-repo --no-trees br
bzr init br/trunk
bzr branch br/trunk br/new-branch
bzr co br/new-branch wd
cd wd
echo abc > abc
bzr add
bzr ci -m "Added file."
cd ..
hg convert br hr

initializing destination hr repository
scanning source...
** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01) [GCC 4.3.4 20090804 
(release) 1]
** Mercurial Distributed SCM (version 1.9.3)
** Extensions loaded: color, graphlog, progress, convert, extdiff, purge, 
record, fetch, schemes, hgk, rebase
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 27, 
in run
    sys.exit(dispatch(request(sys.argv[1:])))
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 64, 
in dispatch
    return _runcatch(req)
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 87, 
in _runcatch
    return _dispatch(req)
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 688, 
in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 463, 
in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.6/site-packages/mercurial/extensions.py", line 
182, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/hgext/color.py", line 368, in 
colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 742, 
in _runcommand
    return checkargs()
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 696, 
in checkargs
    return cmdfunc()
  File "/usr/lib/python2.6/site-packages/mercurial/dispatch.py", line 685, 
in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib/python2.6/site-packages/mercurial/util.py", line 389, in 
check
    return func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/hgext/convert/__init__.py", line 
269, in convert
    return convcmd.convert(ui, src, dest, revmapfile, **opts)
  File "/usr/lib/python2.6/site-packages/hgext/convert/convcmd.py", line 
445, in convert
    c.convert(sortmode)
  File "/usr/lib/python2.6/site-packages/hgext/convert/convcmd.py", line 
342, in convert
    parents = self.walktree(heads)
  File "/usr/lib/python2.6/site-packages/hgext/convert/convcmd.py", line 
136, in walktree
    commit = self.cachecommit(n)
  File "/usr/lib/python2.6/site-packages/hgext/convert/convcmd.py", line 
295, in cachecommit
    commit = self.source.getcommit(rev)
  File "/usr/lib/python2.6/site-packages/hgext/convert/bzr.py", line 142, 
in getcommit
    rev = self.sourcerepo.get_revision(version)
  File "<string>", line 4, in get_revision_read_locked
  File "/usr/lib/python2.6/site-packages/bzrlib/repository.py", line 845, 
in get_revision
    return self.get_revisions([revision_id])[0]
  File "<string>", line 4, in get_revisions_read_locked
  File "/usr/lib/python2.6/site-packages/bzrlib/vf_repository.py", line 
1335, in get_revisions
    return self._get_revisions(revision_ids)
  File "<string>", line 4, in _get_revisions_read_locked
  File "/usr/lib/python2.6/site-packages/bzrlib/vf_repository.py", line 
1343, in _get_revisions
    raise errors.NoSuchRevision(self, revid)
bzrlib.errors.NoSuchRevision: CHKInventoryRepository('file:///home/al/test/
br/.bzr/repository/') has no revision null:

----------
messages: 18973
nosy: abudden
priority: bug
status: unread
title: hg convert fails with empty trunk if other branches exist

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3251>
____________________________________________________



More information about the Mercurial-devel mailing list