Issue1240

Title qcommit fails after qrename of newly-created patch
Priority bug Status resolved
Superseder KeyError for copy in commit
View: 1175
Nosy List dbaron, mpm, pmezard
Assigned To Topics

Created on 2008-07-24.22:53:09 by dbaron, last changed 2008-07-25.07:31:01 by pmezard.

Messages
msg6581 (view) Author: pmezard Date: 2008-07-25.07:30:42
Actually, this one is fixed in -stable by
http://hg.intevation.org/mercurial/stable/rev/2519976a998b
msg6577 (view) Author: mpm Date: 2008-07-24.23:41:55
Join the party! This is issue1175.
msg6575 (view) Author: dbaron Date: 2008-07-24.22:52:42
Doing an hg qrename of a newly-created (uncommitted) patch in a versioned queue
repository puts the queue repository into a state where it's impossible to commit.

Simple steps to reproduce:

dbaron@pickering Linux (0) ~ $ hg init temp-repo
dbaron@pickering Linux (0) ~ $ cd temp-repo/
dbaron@pickering Linux (0) ~/temp-repo $ hg qinit -c
dbaron@pickering Linux (0) ~/temp-repo $ hg qnew -m"My patch." foo
dbaron@pickering Linux (0) ~/temp-repo $ hg qrename foo bar
dbaron@pickering Linux (0) ~/temp-repo $ hg qci -m"Add patch bar."
transaction abort!
rollback completed
** 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 24, in <module>
    mercurial.dispatch.run()
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/dispatch.py",
line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/dispatch.py",
line 29, in dispatch
    return _runcatch(u, args)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/dispatch.py",
line 45, in _runcatch
    return _dispatch(ui, args)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/dispatch.py",
line 364, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/dispatch.py",
line 417, in _runcommand
    return checkargs()
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/dispatch.py",
line 373, in checkargs
    return cmdfunc()
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/dispatch.py",
line 356, in <lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/hgext/mq.py",
line 1651, in commit
    commands.commit(r.ui, r, *pats, **opts)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/commands.py",
line 557, in commit
    node = cmdutil.commit(ui, repo, commitfunc, pats, opts)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/cmdutil.py",
line 1179, in commit
    return commitfunc(ui, repo, files, message, match, opts)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/commands.py",
line 555, in commitfunc
    force_editor=opts.get('force_editor'))
  File "/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/hgext/mq.py",
line 2189, in commit
    return super(mqrepo, self).commit(*args, **opts)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/localrepo.py",
line 832, in commit
    new[f] = self.filecommit(f, m1, m2, linkrev, trp, changed)
  File
"/usr/local/mercurial-1.0.1/lib/python2.5/site-packages/mercurial/localrepo.py",
line 712, in filecommit
    meta["copyrev"] = hex(manifest1[cp])
KeyError: 'foo'
dbaron@pickering Linux (1) ~/temp-repo $
History
Date User Action Args
2008-07-25 07:31:01pmezardsetstatus: chatting -> resolved
nosy: mpm, pmezard, dbaron
2008-07-25 07:30:44pmezardsetstatus: resolved -> chatting
nosy: + pmezard
messages: + msg6581
2008-07-24 23:41:55mpmsetstatus: unread -> resolved
superseder: + KeyError for copy in commit
messages: + msg6577
nosy: + mpm
2008-07-24 22:53:09dbaroncreate