[issue1240] qcommit fails after qrename of newly-created patch

L. David Baron mercurial-bugs at selenic.com
Thu Jul 24 17:53:09 CDT 2008


New submission from L. David Baron <dbaron at dbaron.org>:

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 at pickering Linux (0) ~ $ hg init temp-repo
dbaron at pickering Linux (0) ~ $ cd temp-repo/
dbaron at pickering Linux (0) ~/temp-repo $ hg qinit -c
dbaron at pickering Linux (0) ~/temp-repo $ hg qnew -m"My patch." foo
dbaron at pickering Linux (0) ~/temp-repo $ hg qrename foo bar
dbaron at 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 at 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 at pickering Linux (1) ~/temp-repo $

----------
messages: 6575
nosy: dbaron
priority: bug
status: unread
title: qcommit fails after qrename of newly-created patch

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1240>
____________________________________________________



More information about the Mercurial-devel mailing list