RFE: hg import --bypass target should be customizable

Marc Strapetz marc.strapetz at syntevo.com
Wed Nov 23 15:22:38 UTC 2011


On 23.11.2011 15:34, Patrick Mézard wrote:
> Le 22/11/11 18:51, Marc Strapetz a écrit :
>> I'm trying to import a self-created patch into an existing
>> Mercurial repository with "hg import". Goal is to not touch the
>> working copy, so I'm using --bypass. Unfortunately, --bypass will
>> always use the working copy parent which is in general not the
>> target changeset to which the patch should be applied. --exact
>> would allow to specify the target "Parent" in the patch, but
>> unfortunately it performs a final check whether "Node ID" from the
>> patch matches resulting changeset ID, which isn't the case because
>> it's self-created and it would be (too) hard to calculate the
>> correct SHA.
> 
> Are you writing a mercurial extension?

No. I'm looking for a robust sequence of commands to "amend" a commit
which can be executed from within a GUI client. I haven't considered to
do that by a separate extension, but only by standard Mercurial
functionality (including default extensions).

> IIRC, we considered having an option to specify the parents, but we
> decided to go for the simple --bypass version first, as it was really
> a test-bed for the working dir-less patcher. Maybe a --bypass-parents
> taking a revset would be good enough.

--bypass-parents would work well and doesn't look like a big change.
Would a corresponding patch be accepted?

--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com




More information about the Mercurial-devel mailing list