hg equivalent to "bk collapse"?
Giorgos Keramidas
keramida at ceid.upatras.gr
Tue Mar 20 00:38:02 UTC 2007
On 2007-03-20 00:16, Ben Hood <0x6e6562 at gmail.com> wrote:
>> You might want to have a look at hg qimport -r and hg qdel -r, as well
>> as qfold.
>>
>> qimport -r will convert existing hg changesets into mq patches, and
>> qdel -r will convert applied mq patches into regular hg
>> changesets. So, for instance, you could replace
>>
>>> hg qpop -a
>>> hg import .hg/patches/144361 && hg qdelete 144361
>>> hg import .hg/patches/144342 && hg qdelete 144342
>>
>> with hg qdel -r qbase:qtip (or whatever revs you want to commit).
>>
>> If you only want one patch, you might prefer this:
>>
>> hg qpop 144361
>> hg qfold 144342
>> hg qdel -r 144361
>
> But doesn't that nuke the history you may want to keep for your own
> purposes?
>
> Sorry if this is newbie question but wouldn't it make more sense to
> have the opposite of qimport to convert (non-destructively) back to an
> exportable diff (e.g. qexport), or am I missing the point?
Once you convert an MQ patch to a "real changeset", you can always use
the normal "hg export" command to extract the diff/patchfile for this
changeset only:
% hg export --git REV
More information about the Mercurial
mailing list