/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Parth Malwankar
  • Date: 2010-09-17 15:15:34 UTC
  • mto: This revision was merged to the branch mainline in revision 5444.
  • Revision ID: parth.malwankar@gmail.com-20100917151534-587xpe9adve1jhw3
used active_shelves instead of creating a new function for listing shelves

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    reconfigure,
44
44
    rename_map,
45
45
    revision as _mod_revision,
46
 
    shelf,
47
46
    static_tuple,
48
47
    symbol_versioning,
49
48
    timestamp,
5881
5880
        tree = WorkingTree.open_containing('.')[0]
5882
5881
        self.add_cleanup(tree.lock_read().unlock)
5883
5882
        manager = tree.get_shelf_manager()
5884
 
        shelves = shelf.list_shelves(tree)
 
5883
        shelves = manager.active_shelves()
5885
5884
        if len(shelves) == 0:
5886
5885
            note('No shelved changes.')
5887
5886
            return 0
5888
 
        for shelf_id, message in shelves:
 
5887
        for shelf_id in reversed(shelves):
 
5888
            message = manager.get_metadata(shelf_id).get('message')
 
5889
            if message is None:
 
5890
                message = '<no message>'
5889
5891
            self.outf.write('%3d: %s\n' % (shelf_id, message))
5890
5892
        return 1
5891
5893