[Python-Dev] Hg question (original) (raw)

Sjoerd Mullender sjoerd at acm.org
Tue Apr 12 21:20:26 CEST 2011


On 2011-04-12 20:35, Alexander Belopolsky wrote:

I was preparing a commit to 3.2 and default branches and mistakenly used -m insread of -l commit option. As a result, I have

$ hg out comparing with ssh://hg@hg.python.org/cpython searching for changes changeset: 69272:0bf1354fab6b branch: 3.2 parent: 69268:bfc586c558ed user: Alexander Belopolsky <alexander.belopolsky at gmail.com> date: Tue Apr 12 14:00:43 2011 -0400 summary: m.txt changeset: 69273:516ed700ce22 tag: tip parent: 69270:c26d015cbde8 parent: 69272:0bf1354fab6b user: Alexander Belopolsky <alexander.belopolsky at gmail.com> date: Tue Apr 12 14:02:22 2011 -0400 summary: m.txt

I would like to replace m.txt in the summary with the content of the file m.txt. I tried to use the recipe [1], but qimport fails: $ hg qimport -r 69272:tip abort: cannot import merge revision 69273 [1] http://stackoverflow.com/questions/623052/how-to-edit-incorrect-commit-message-in-mercurial PS: This scenario seems to be a usability regression compared to SVN. SVN would actually warn me if I tried to use -m with a file name instead of a message and editing the commit log in SVN is fairly straightforward.

If you didn't push the changes to any other clone, you can hg strip these changesets and do it again, correctly. strip is part of the rebase extension.

You cannot edit history that has already been shared with other clones. If you did, it would just come back at the next pull.

-- Sjoerd Mullender

-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 371 bytes Desc: OpenPGP digital signature URL: <http://mail.python.org/pipermail/python-dev/attachments/20110412/3f1449cf/attachment.pgp>



More information about the Python-Dev mailing list