~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-30 02:21:00 UTC
  • Revision ID: mbp@sourcefrog.net-20050530022059-398cc7aba9d8d9b1
- change inventory command to not show ids by default

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
 
335
335
class cmd_inventory(Command):
336
336
    """Show inventory of the current working copy or a revision."""
337
 
    takes_options = ['revision']
 
337
    takes_options = ['revision', 'show-ids']
338
338
    
339
 
    def run(self, revision=None):
 
339
    def run(self, revision=None, show_ids=False):
340
340
        b = Branch('.')
341
341
        if revision == None:
342
342
            inv = b.read_working_inventory()
344
344
            inv = b.get_revision_inventory(b.lookup_revision(revision))
345
345
 
346
346
        for path, entry in inv.entries():
347
 
            print '%-50s %s' % (entry.file_id, path)
 
347
            if show_ids:
 
348
                print '%-50s %s' % (path, entry.file_id)
 
349
            else:
 
350
                print path
348
351
 
349
352
 
350
353
class cmd_move(Command):