Message6134

Author cgudrian
Recipients
Date 2008-06-02.09:10:36
Content
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@quintus:~/test$ hg init
gn@quintus:~/test$ hg qinit
gn@quintus:~/test$ hg qnew test.patch
gn@quintus:~/test$ echo "Hello, World" > test
gn@quintus:~/test$ hg add test
gn@quintus:~/test$ hg qrefresh
gn@quintus:~/test$ hg rename test old_test
gn@quintus:~/test$ hg qrefresh
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial@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@quintus:~/test$ hg revert --all
abort: 00changelog.i@54387fe543f0: no node!
gn@quintus:~/test$ hg qrefresh
abort: 00changelog.i@54387fe543f0: no node!
gn@quintus:~/test$ hg qpop -f
abort: 00changelog.i@54387fe543f0: no node!
gn@quintus:~/test$ hg --version
Mercurial Distributed SCM (version 1.0.1)

Copyright (C) 2005-2008 Matt Mackall <mpm@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@quintus:~/test$

Obviously the repository remains in an unusable state.

This behaviour occurs on Linux, Windows and Mac OS.
History
Date User Action Args
2008-06-02 09:10:39cgudriansetmessageid: <1212397839.57.0.970751309784.issue1152@selenic.com>
2008-06-02 09:10:39cgudrianlinkissue1152 messages
2008-06-02 09:10:36cgudriancreate