[Bug 4741] bzr shelve is confusing to me

Matthieu Moy Matthieu.Moy at imag.fr
Thu Nov 24 20:05:24 GMT 2005


Brad Bollenbach <brad.bollenbach at gmail.com> writes:

> A common use case for undo/redo, IME, is waking up in the morning,
> undo'ing changes I've made on a branch, synching down the latest
> version of HEAD, and then redo'ing my changes back onto the branch to
> make sure I'm synched up and the conflict pain is kept to a minimum.

With tla/baz, this is what "update" does. Unfortunately, if you get
important conflicts while redoing your changes, you don't have an easy
way to restore them.

But here, you're forgetting the advantage of decentralized revision
control: you have a local branch, so you can commit _before_ synching
with the HEAD. Then, merge from upstream. If you get a conflict, and
mess up everything while trying to revolve them, then "bzr revert"
still works, and restores your tree before the merge, including your
previous manual changes. In some cases, you may even want to commit
with conflict markers and resolve them in the next revision, to keep
track of how you solved the conflicts.

If you really don't want to commit before merging, there's also a
--force flag to revert.

> +1 to unifying the commands. This syntax seems reasonable to my naive
> eyes, but calling it "undo"/"redo" would be a little more human, IMHO

I believe this would be more Arch-ish, but not necessarily more human.
"undo" usually means "undo the last thing I've done". I believe
"revert" is the correct wording to say "revert the changes I've done
since last commit".

-- 
Matthieu




More information about the bazaar mailing list