revert/shelf/undo/redo

Matthieu Moy Matthieu.Moy at imag.fr
Wed Oct 19 09:09:09 BST 2005


Martin Pool <martinpool at gmail.com> writes:

> The Arch solution to this is more or less, that the "undo" command
> saves a changeset representing the uncommitted changes are stored to a
> file called (approximately) ,,undo-1, and then removes them.

One nice thing with "baz undo" is that it stores a changeset, not a
snapshot. This means you can

$ baz undo
$ <do something else>
$ baz redo

in particular, this is what "baz update" does (undo; replay; redo).

You can also

$ cd /first/project
$ baz undo
$ cd /another/project
$ baz redo /first/project/,,undo-1

to "move" some modifications from one tree to another.

There are probably cases where a full snapshot is better, but I think
being able to use changeset is a real advantage. Another option is to
store a snapshot and the revision id of the revision against which the
"undo" was performed.

-- 
Matthieu




More information about the bazaar mailing list