hg equivalent to "bk collapse"?

Brendan Cully brendan at kublai.com
Wed Mar 21 18:01:31 UTC 2007


On Tuesday, 20 March 2007 at 00:16, Ben Hood 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?

qdel -r is more or less the opposite of qimport -r. But you don't need
to use it to export an mq patch. You can export any applied patch just
as if it were a regular changeset.



More information about the Mercurial mailing list