[issue2981] hgsubversion push error after replacing a file by a symlink
wojas
bugs at mercurial.selenic.com
Thu Sep 1 08:00:20 CDT 2011
New submission from wojas <mercurial-bt at m.wojas.nl>:
I am using a hgsubversion checkout of a subversion repository. Today I replaced a normal file by a symlink to
a directory and committed it to Hg, which went fine. I pulled the latest changes and ran 'hg rebase --svn' to
rebase my local changes on top of the latest SVN changes.
When I then ran 'hg push' I received the following error message:
$ hg push
pushing to svn+https://[.....]
searching for changes
[r9012] wojas: fixed dbview link
pulled 1 revisions
no tool found to merge django/apps/dbview
keep (l)ocal or take (o)ther? l
saved backup bundle to /Users/wojas/ds/platform-hg/.hg/strip-backup/5e5a12443ca9-backup.hg
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.7 (r267:88850, Aug 30 2011, 17:39:39) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build
2335.15.00)]
** Mercurial Distributed SCM (version 1.9)
** Extensions loaded: rebase, convert, hgk, extdiff, hgattic, hgsubversion
Traceback (most recent call last):
File "/Users/wojas/dev/ds/bin/hg", line 38, in <module>
mercurial.dispatch.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 27, in run
sys.exit(dispatch(request(sys.argv[1:])))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 64, in dispatch
return _runcatch(req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 87, in _runcatch
return _dispatch(req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 675, in _dispatch
cmdpats, cmdoptions)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 454, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 729, in _runcommand
return checkargs()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 683, in checkargs
return cmdfunc()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/dispatch.py", line 672, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/extensions.py", line 137, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/hgsubversion/wrappers.py", line 520, in generic
return orig(ui, repo, *args, **opts)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/util.py", line 385, in check
return func(*args, **kwargs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/mercurial/commands.py", line 3884, in push
newbranch=opts.get('new_branch'))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/hgsubversion/svnrepo.py", line 48, in wrapper
return fn(self, *args, **opts)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/hgsubversion/svnrepo.py", line 59, in push
return wrappers.push(self, remote, force, revs)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/hgsubversion/wrappers.py", line 181, in push
base_revision = hashes[base_ctx.node()][0]
KeyError: '\x1e\x98o\xa0u\xae\x9d\x19#o\x19\x85z!\x13EK\x13\xdeK'
When I retried the command I saw the following output and then the same backtrace:
searching for changes
[r9013] wojas: fixed dbview link
pulled 1 revisions
(backtrace here)
The hg log now looks like this:
changeset: 1082:9477f4ef2ebe
svn:
tag: tip
date: Thu Sep 01 13:51:45 2011 +0200
summary: (Another local change)
changeset: 1081:eee96a1b2ff3
svn:
date: Thu Sep 01 13:50:41 2011 +0200
summary: fixed dbview link
changeset: 1080:f3996c079dcf
svn: 9013
date: Thu Sep 01 11:56:55 2011 +0000
summary: fixed dbview link
changeset: 1079:bc705f6a5c4c
svn: 9012
date: Thu Sep 01 11:53:49 2011 +0000
summary: fixed dbview link
changeset: 1078:67ae7a5661f6
svn: 9008
date: Thu Sep 01 10:00:39 2011 +0000
summary: (Some other commit)
Note that there are two commits in SVN and my local change still exists.
I received the following SVN commit email messages:
r9012:
-link ../3rdparty/djangodbview
\ No newline at end of file
+link ../3rdparty/djangodbview/
\ No newline at end of file
r9013:
-link ../3rdparty/djangodbview/
\ No newline at end of file
+link link ../3rdparty/djangodbview/
\ No newline at end of file
An SVN checkout now gives the following incorrect result:
lrwxr-xr-x 1 wojas _www 30 1 Sep 14:37 dbview -> link ../3rdparty/djangodbview/
I tried to recover from this by cloning without the last few revisions and pulling:
$ hg clone -r 67ae7a5661f6 platform-hg platform-hg-fixed
$ cp platform-hg/.hg/hgrc platform-hg-fixed/.hg/hgrc
$ cd platform-hg-fixed
$ hg pull
But now it tried to pull all SVN history again from the first revision... I tried copying .hg/svn/, but after
that the 'fixed' repository claimed my SVN checkout was up to date.
----------
messages: 17291
nosy: wojas
priority: urgent
status: unread
title: hgsubversion push error after replacing a file by a symlink
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2981>
____________________________________________________
More information about the Mercurial-devel
mailing list