Multiple undo again...
Paul Boddie
paul.boddie at biotek.uio.no
Fri Jun 4 09:11:43 CDT 2010
Jason Harris wrote:
> Actually what you are describing is exactly how things are about to work with MacHg. I have a .hgbackup directory which is a Mercurial meta-data repository which contains a snapshot of *everything* before any "changing" hg command. (eg status and log don't do any changing, but addremove, commit, strip, etc do changing.)
>
> Then to undo I just do the update to this snapshot revision by saying Mercurial should work with the .hgbackup dir instead of the .hg dir. If you want to do the redo you just do the update to tip on this parallel .hgbackup dir. And if you want you can move anywhere in the tree of changes in this .hgbackup dir.
>
But does this conveniently support multiple levels of undo? Of course,
Mercurial naturally supports multiple level "undo/redo" by design: it's
the desire to discard "undone" work that you're interested in, I
believe. Browsing the Wiki, I see that what I described as "some kind of
cloning plus replaying of unwanted changesets", where I think I actually
meant "wanted changesets" since I was talking about discarding unwanted
work at that point, it looks like 'hg strip' would be able to support
such a thing.
Paul
More information about the Mercurial-devel
mailing list