[Pkg-bazaar-commits] ./bzr/unstable r136: new --show-ids option for 'deleted' command

mbp at sourcefrog.net mbp at sourcefrog.net
Fri Apr 10 07:51:13 UTC 2009


------------------------------------------------------------
revno: 136
committer: mbp at sourcefrog.net
timestamp: Tue 2005-03-29 16:10:25 +1000
message:
  new --show-ids option for 'deleted' command
modified:
  bzrlib/commands.py
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-03-29 06:02:14 +0000
+++ b/bzrlib/commands.py	2005-03-29 06:10:25 +0000
@@ -339,7 +339,7 @@
 
 
 
-def cmd_deleted():
+def cmd_deleted(show_ids=False):
     """List files deleted in the working tree.
 
 TODO: Show files deleted since a previous revision, or between two revisions.
@@ -350,7 +350,11 @@
 
     for path, ie in old.inventory.iter_entries():
         if not new.has_id(ie.file_id):
-            print path
+            if show_ids:
+                print '%-50s %s' % (path, ie.file_id)
+            else:
+                print path
+                
     
 
 
@@ -618,9 +622,10 @@
 cmd_options = {
     'add':                    ['verbose'],
     'commit':                 ['message', 'verbose'],
+    'deleted':                ['show-ids'],
     'diff':                   ['revision'],
     'inventory':              ['revision'],
-    'log':                    ['show-ids', 'timezone'],
+    'log':                    ['timezone'],
     'ls':                     ['revision', 'verbose'],
     'remove':                 ['verbose'],
     'status':                 ['all'],
@@ -700,7 +705,6 @@
                     else:
                         optarg = argv.pop(0)
                 opts[optname] = optargfn(optarg)
-                mutter("    option argument %r" % opts[optname])
             else:
                 if optarg != None:
                     bailout('option %r takes no argument' % optname)
@@ -799,7 +803,8 @@
                     % (oname, cmd))
 
     cmdargs = _match_args(cmd, args)
-    cmdargs.update(opts)
+    for k, v in opts.items():
+        cmdargs[k.replace('-', '_')] = v
 
     ret = cmd_handler(**cmdargs) or 0
 



More information about the Pkg-bazaar-commits mailing list