[issue973] #CVSPS_NO_BRANCH error on openafs cvs repository

Troy Benjegerdes mercurial-bugs at selenic.com
Sun Feb 10 01:53:42 UTC 2008


New submission from Troy Benjegerdes <hozer at hozed.org>:

troy at lyta:/extra/oafs-hgtest$ hg convert openafs
assuming destination openafs-hg
initializing destination openafs-hg repository
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 0.9.5)
Traceback (most recent call last):
  File "/usr/bin/hg", line 14, in ?
    mercurial.dispatch.run()
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 29, in
dispatch
    return _runcatch(u, args)
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 45, in
_runcatch
    return _dispatch(ui, args)
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 348, in
_dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 401, in
_runcommand
    return checkargs()
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 357, in
checkargs
    return cmdfunc()
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 342, in
<lambda>
    d = lambda: func(ui, *args, **cmdoptions)
  File "/var/lib/python-support/python2.4/hgext/convert/__init__.py", line 362,
in convert
    opts.get('rev'))
  File "/var/lib/python-support/python2.4/hgext/convert/__init__.py", line 38,
in convertsource
    return source(ui, path, rev)
  File "/var/lib/python-support/python2.4/hgext/convert/cvs.py", line 25, in
__init__
    self._parse()
  File "/var/lib/python-support/python2.4/hgext/convert/cvs.py", line 68, in _parse
    self.parent[id] = self.lastbranch[ancestor]
KeyError: '#CVSPS_NO_BRANCH'



When I was experimenting with the convert-repo contrib code in the past I had to
do this:

diff -r ba22e867cb23 contrib/convert-repo
--- a/contrib/convert-repo      Mon May 07 21:44:11 2007 +0900
+++ b/contrib/convert-repo      Fri May 11 00:29:20 2007 -0500
@@ -96,8 +96,13 @@ class convert_cvs:
                         branch = l[8:-1]
                         self.parent[id] = self.lastbranch.get(branch,'bad')
                         self.lastbranch[branch] = id
+                        if branch == '#CVSPS_NO_BRANCH':
+                            print "warning: patchset id %s has branch #CVSPS_NO
_BRANCH" % id
                     elif l.startswith("Ancestor branch"):
                         ancestor = l[17:-1]
+                        if (ancestor == "#CVSPS_NO_BRANCH"):
+                            print "patchset id: %s ancestor: %s assuming HEAD"
% (id, ancestor)
+                            ancestor = "HEAD"
                         self.parent[id] = self.lastbranch[ancestor]
                     elif l.startswith("Author"):
                         author = self.recode(l[8:-1])

----------
messages: 5168
nosy: hozer
priority: bug
status: unread
title: #CVSPS_NO_BRANCH error on openafs cvs repository

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




More information about the Mercurial-devel mailing list