[issue3356] import --exact fails to import MQ-generated patch

Stefan Ring bugs at mercurial.selenic.com
Thu Apr 5 04:02:40 CDT 2012


New submission from Stefan Ring <stefanrin at gmail.com>:

This is very similar to issue 2790.

The format of the metadata at the beginning of the patch differs between
patches generated via MQ (qrefresh) and via hg export. In the MQ case, it
looks like this:

# Node ID 5f96d29476f51fbd2e2e29c8694ef7fe9fb1b226
# Parent 7b5f756b82327291e62dc7e3360cadd07b7a6207

while hg export produces this:

# Node ID b55f48d8b9d941e8d1e4a70777e032e011104404
# Parent  7b5f756b82327291e62dc7e3360cadd07b7a6207

Consequently, hg import --exact fails to apply the MQ-generated patch. It
complains thusly:

abort: unknown revision 'b5f756b82327291e62dc7e3360cadd07b7a6207'!

Note the stripped first character of the parent hash.

It would be good to make both formats equal for an improved patch handling
experience. Also, hg import --exact should be made more tolerant regarding
the formatting of the patch, like it has been done for qpush --exact before.

$ hg version
Mercurial Distributed SCM (version 2.0.2+145-878bc4a62a73)

----------
messages: 19525
nosy: Ringding
priority: wish
status: unread
title: import --exact fails to import MQ-generated patch
topic: mq

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


More information about the Mercurial-devel mailing list