Undo command?
Nicholas Allen
allen at ableton.com
Tue Dec 12 16:34:13 GMT 2006
> In common usage, you revert *to* a previous state. That's also the
> usage in programs like Photoshop, where you can revert *to* the
> last-saved version. So I think the common expectation is for revert to
> change everything to a previous state, not to reverse particular changes.
>
I disagree - to "revert something" and to "revert *back to* something"
are two different verbs in the English language and I would argue that
"revert -r 10" is closer to the first meaning (where "-r 10" is
"something") than the second - so I would personally expect it to
"revert revision 10" but not to "revert back to revision 10".
Of course reverting back to a revision is just a special case of
reverting a range of revisions (as it is the range of revisions up to
the head that would get reverted). So if the revert command was changed
to revert the changes made in revisions you could revert back to
revision 10 by doing:
bzr revert -r 11..-1
to get the same behavior as present. Or you could add a --back-to option
for added convenience:
bzr revert --back-to 10
that would do the same thing. Personally, I think it would be nicer if
revert behaved this way as it is a superset of the existing behavior and
the user can therefore still do everything that they currently can as
well as being able to revert individual revisions and ranges of
revisions. The --back-to option also makes it really clear what you are
doing.
Nick
More information about the bazaar
mailing list