tla undo/redo like functionality for hg
Stefan Reichör
stefan at xsteve.at
Tue Nov 28 10:04:48 UTC 2006
"Benoit Boissinot" <bboissin at gmail.com> writes:
> On 11/28/06, Stefan Reichör <stefan at xsteve.at> wrote:
>> Hi!
>>
>> One very useful of GNU Arch is that I can undo all current changes
>> and store them in a directory.
>>
>> Later I can redo that saved changes.
>>
>>
>> How can I do that with hg?
>>
>> I could start like this:
>>
>> % hg diff --git > changeset.diff
>> % hg revert --no-backup
>>
>> ...
>>
>> How can I redo now my changes?
>> % hg import changeset.diff
>> That command will commit the changes. Is there a way to apply the
>> changes without committing?
>
> patch -p1 < changeset.diff ? (this may have problem with git patches)
Exactly. It would be nice, if mercurial has a command to apply a patch
without committing it.
What about "hg import --no-commit"
> But the easiest way is with mq:
>
> hg qnew -f changeset.diff
> hg qpop
> hg qpush
I have several questions to this suggestion:
a) Can I save several changesets (changeset1.diff, changeset2.diff)
and apply them in arbitrary order?
b) Is the patch recorded in the repository? And if yes, can I
delete this patch from the repository.
Stefan.
More information about the Mercurial-devel
mailing list