bzr resurrect vs. bzr revert
David Allouche
david at allouche.net
Mon May 30 15:24:57 BST 2005
On Mon, 2005-05-30 at 07:51 -0400, Aaron Bentley wrote:
> Or the answer could always be "Whatever mistake you made, bzr revert foo
> - -r REV FILE will restore the file to a good state-- you just need to
> specify the revision when the file was in good shape."
>
> Instead of
>
> "Aaah! I screwed up a file!"
> "Did you modify it incorrectly, or did you delete it"
> "I deleted it."
> "Well, if you deleted it, use resurrect. If you introduced a bad
> change, use revert."
>
> So in fact, you now have three answers. resurrect for deletions, revert
> to return files to their last-committed state, and revert -r to return
> files to some other committed state.
Here is an archetypal conversation with an user:
user: shit, one of my files is gone, how can I restore it?
ddaa: did you commit since you deleted it?
user: I don't know, I just see it's not here.
Revert should certainly be able to "resurrect" deleted files, so your
solution would still be valid.
But it would not have the same love value, in terms of ability to give a
straightforward answer to an apparently simple question.
> I guess if you figure it's an important enough case, it makes sense to
> have a separate command.
>
> Personally, I don't recall ever deleting a file, committing, and then
> wanting that file back. If that's the common case, having one command
> is better.
I do not think it is an important use case. But I do think it can make
some users happier as it would give them less to think about.
For example, that could be one of the commands not shown in the short
help listing. Then if the user asks why, we can explain that is just a
DWIM wrapper around "revert" and that he should learn about "revert".
It's much more friendly to give an easy solution to the problem at hand,
then encourage to learn about the proper tools, rather than requiring
the user to learn about several generic tools (status, log and revert)
to be able to solve the problem.
Anyway, "resurrect" lies in the realm of "nice to have", not "needed in
the pursuit of happiness".
--
-- ddaa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050530/6fb31430/attachment.pgp
More information about the bazaar
mailing list