[Bug 4741] bzr shelve is confusing to me

Martin Pool mbp at sourcefrog.net
Tue Nov 29 04:44:02 GMT 2005


On 24 Nov 2005, Matthieu Moy <Matthieu.Moy at imag.fr> wrote:
> 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.

Right - this ability to make a cheap local commit before merging,
without needing to create archives, branches, etc, is a key goal.  I
expect people would still want to do this into a local lightweight
branch even if they do their regular development in an archive-style
branch stored remotely.

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

I think you mean --force flag to merge.

> 
> > +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".

Right, the reason we don't have any "undo" is that we want to do it
right: undo all commands, not just local edits.

-- 
Martin




More information about the bazaar mailing list