[issue973] #CVSPS_NO_BRANCH error on openafs cvs repository

Troy Benjegerdes mercurial-bugs at selenic.com
Sat Feb 9 19:53:42 CST 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 ?
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 20, in run
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 29, in
    return _runcatch(u, args)
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 45, in
    return _dispatch(ui, args)
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 348, in
    ret = _runcommand(ui, options, cmd, d)
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 401, in
    return checkargs()
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 357, in
    return cmdfunc()
  File "/var/lib/python-support/python2.4/mercurial/dispatch.py", line 342, in
    d = lambda: func(ui, *args, **cmdoptions)
  File "/var/lib/python-support/python2.4/hgext/convert/__init__.py", line 362,
in convert
  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
  File "/var/lib/python-support/python2.4/hgext/convert/cvs.py", line 68, in _parse
    self.parent[id] = self.lastbranch[ancestor]

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>

More information about the Mercurial-devel mailing list