[Bug 4741] bzr shelve is confusing to me

Brad Bollenbach brad.bollenbach at gmail.com
Thu Nov 24 19:48:52 GMT 2005


(Oops, I accidentally responded to the bugmail mail, instead of the  
list mail. Here it is again, for the other recipients. :)

On 24-Nov-05, at 1:42 PM, Matthieu Moy wrote:

> Public bug report changed:
> https://launchpad.net/malone/bugs/4741
>
> Comment:
> Aaron Bentley <aaron.bentley at utoronto.ca> writes:
>
>> Your bug report basically translates as "bzr unshelve isn't baz  
>> undo",
>> and my answer to that is "Correct.  It's not."  Had you asked "What's
>> the equivalent of baz undo?" on the list, you would have gotten a
>> helpful answer.  Probably along the lines of "Revert, except that
>> there's no redo command".
>
> That's the key point. "bzr revert" is what brad is looking for.

I'm aware of, though have never used, bzr revert. The way it  
currently functions though is most certainly not what I'm looking  
for. :)

I'm looking for undo behaviour, which implies redo. If, as you  
suggest later, there were something to undo a revert, then yes, bzr  
revert would be what I want.

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.

>> Complain if you like, but it's baz and tla that use the term
> incorrectly.
>
> Since "bzr" is "Bazaar 2", it would make sense to have an undo command
> that would either be an alias for "revert" or a command printing eg
> "There is no undo command in bzr. See \"revert\"." and exiting.
>
> That's a stupid detail but that would reduce the migration effort.

It might seem like a stupid detail to an implementor, but it would be  
a golden detail to someone like me (and all the other Launchpad  
developers who scratch their head asking "hey, where did 'undo' go?" :)

>> It's not the equivalent.  There is no exact equivalent.  Shelve is a
>> fine-grained tool for separating text changes, and has an 'unshelve'
>> equivalent.  Revert is a non-interactive command that reverses all
>> changes, like permissions, renames and symlink changes, but does not
>> provide an inverse operation.
>
> Actually, it would be nice if "revert" had an "unrevert" (or probably
> a better name) dual. I think it would make sense to unify the two
> commands. Stg like:
>
> bzr revert --interactive  => bzr shelve
> bzr unrevert              => bzr unshelve

+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  
(even if those are just aliases.)

Cheers,

--
Brad Bollenbach






More information about the bazaar mailing list