[MERGE] Add ls-shelf command

Martin Pool mbp at canonical.com
Tue Dec 2 08:29:31 GMT 2008


Martin Pool has voted tweak.
Status is now: Conditionally approved
Comment:
I think 'shelve --list/-l' would be a bit more stylish, and avoid 
growing the command list too much.  (I realize it's a grey area, since 
we don't do 'shelve --unshelve'.)

+            if len(shelves) == 0:
+                note('No shelved changes.')
+                return 0
+            for shelf_id in reversed(shelves):
+                message = manager.get_metadata(shelf_id).get('message')
+                if message is None:
+                    message = '<no message>'
+                self.outf.write('%3d: %s\n' % (shelf_id, message))
+            return 1

I would have expected rc 1 if there was nothing, and otherwise 0.  At 
any rate you should probably document it.

-        if names[0] != ('metadata',):
-            raise errors.ShelfCorrupt

It would be nice if the error gave the filename or something, but if it 
does not have space for it you don't need to change it now.

It should be in NEWS.  And maybe shelf should be in the user guide if 
it's not at present.

For details, see: 
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C4934CE66.10604%40aaronbentley.com%3E
Project: Bazaar



More information about the bazaar mailing list