[issue1152] mq corrupts repository on file rename
Christian Gudrian
mercurial-bugs at selenic.com
Mon Jun 2 04:10:39 CDT 2008
New submission from Christian Gudrian <gn at fluidon.dyndns.info>:
The mq extension seems to corrupt the repository when trying to refresh a patch
after having renamed files. Here are the steps to reproduce this error:
gn at quintus:~/test$ hg init
gn at quintus:~/test$ hg qinit
gn at quintus:~/test$ hg qnew test.patch
gn at quintus:~/test$ echo "Hello, World" > test
gn at quintus:~/test$ hg add test
gn at quintus:~/test$ hg qrefresh
gn at quintus:~/test$ hg rename test old_test
gn at quintus:~/test$ hg qrefresh
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.0.1)
Traceback (most recent call last):
File "/usr/local/bin/hg", line 20, in ?
mercurial.dispatch.run()
File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py", line 20,
in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py", line 29,
in dispatch
return _runcatch(u, args)
File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py", line 45,
in _runcatch
return _dispatch(ui, args)
File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py", line 364,
in _dispatch
ret = _runcommand(ui, options, cmd, d)
File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py", line 417,
in _runcommand
return checkargs()
File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py", line 373,
in checkargs
return cmdfunc()
File "/usr/local/lib/python2.4/site-packages/mercurial/dispatch.py", line 356,
in <lambda>
d = lambda: func(ui, repo, *args, **cmdoptions)
File "/usr/local/lib/python2.4/site-packages/hgext/mq.py", line 1743, in
refresh
ret = q.refresh(repo, pats, msg=message, **opts)
File "/usr/local/lib/python2.4/site-packages/hgext/mq.py", line 1150, in
refresh
force=1)
File "/usr/local/lib/python2.4/site-packages/hgext/mq.py", line 2189, in
commit
return super(mqrepo, self).commit(*args, **opts)
File "/usr/local/lib/python2.4/site-packages/mercurial/localrepo.py", line
832, in commit
new[f] = self.filecommit(f, m1, m2, linkrev, trp, changed)
File "/usr/local/lib/python2.4/site-packages/mercurial/localrepo.py", line
712, in filecommit
meta["copyrev"] = hex(manifest1[cp])
KeyError: 'test'
gn at quintus:~/test$ hg revert --all
abort: 00changelog.i at 54387fe543f0: no node!
gn at quintus:~/test$ hg qrefresh
abort: 00changelog.i at 54387fe543f0: no node!
gn at quintus:~/test$ hg qpop -f
abort: 00changelog.i at 54387fe543f0: no node!
gn at quintus:~/test$ hg --version
Mercurial Distributed SCM (version 1.0.1)
Copyright (C) 2005-2008 Matt Mackall <mpm at selenic.com> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gn at quintus:~/test$
Obviously the repository remains in an unusable state.
This behaviour occurs on Linux, Windows and Mac OS.
----------
messages: 6134
nosy: cgudrian
priority: critical
status: unread
title: mq corrupts repository on file rename
topic: mq
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1152>
____________________________________________________
More information about the Mercurial-devel
mailing list