(fwd) bzr shelve feedback
Michael Ellerman
michael at ellerman.id.au
Sat Nov 26 02:11:39 GMT 2005
Hi Brad,
Thanks for the feedback, sorry I didn't reply sooner I've been away for
thanksgiving.
Aaron and others have basically covered what I'm going to say here, but just
for completeness ...
I think the root of the problem here is that you're looking for undo, shelve
is _not_ undo.
I wrote shelve to solve a fairly specific use-case I often come across, which
is that you end up with logically-unrelated changes in your tree and you want
to put some of them aside on the "shelf" while you commit some others. It was
somewhat inspired by darcs per-hunk commit selection.
I apologise if "shelf" doesn't fit your mental model, but I think it's
reasonably intuitive. For non english speakers we can always do something
like this:
@@ -43,6 +46,10 @@
bzrlib.commands.register_command(cmd_shelve)
bzrlib.commands.register_command(cmd_unshelve)
+if os.environ.get('LANG', '').startswith('de_'):
+ cmd_shelve.aliases.append('einlagern')
+ cmd_unshelve.aliases.append('auslagern')
+
def test_suite():
from bzrlib.selftest.TestUtil import TestLoader
import tests
ps. That's probably a joke.
I'm pretty down on the idea of "undo" generally, because I'm not convinced we
can actually make it do what users want:
# bzr init
# bzr add file.txt
# echo "hello world" > file.txt
# bzr ci -m "Add file.txt"
# bzr rename file.txt different.txt
# echo "a year's work" >> different.txt
# echo "another year's work" >> different.txt
# bzr rename different.txt really_different.txt
# bzr undo
Undo what?
1. Rename really_different.txt back to different.txt?
2. Remove "another year's work" from different.txt?
NB. bzr _can't_ do that, but a (naive?) user might expect it to, Microsoft
word can right?
3. Remove "a year's work" from different.txt?
4. Rename different.txt back to file.txt?
5. Set different.txt back to the commited content "hello world" ?
Users are also going to expect undo to be able to undo a commit, merge, pull
etc. What if we're asked to undo a push?
I'm happy to accept suggestions to make the UI for shelve more intuitive, I
agree the current messages probably aren't very useful. I also plan to make
shelve default to shelving everything without prompting, with a flag to get
the hunk selection behaviour. I just haven't thought of a good name for the
flag, --pick, --select, --hunks ??
cheers
--
Michael Ellerman
IBM OzLabs
email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051125/6380a230/attachment.pgp
More information about the bazaar
mailing list