[Pkg-bazaar-commits] ./bzr/unstable r472: - Optional branch parameter to info command

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:19:21 UTC 2009


------------------------------------------------------------
revno: 472
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Wed 2005-05-11 16:18:45 +1000
message:
  - Optional branch parameter to info command
modified:
  NEWS
  bzrlib/commands.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2005-05-11 06:05:28 +0000
+++ b/NEWS	2005-05-11 06:18:45 +0000
@@ -51,6 +51,8 @@
     * If the Python interpreter is too old, try to find a better one
       or give an error.  Based on a patch from Fredrik Lundh.
 
+    * New optional parameter ``bzr info [BRANCH]``.
+
   
   BUG FIXES:
 

=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-05-11 06:12:44 +0000
+++ b/bzrlib/commands.py	2005-05-11 06:18:45 +0000
@@ -369,10 +369,15 @@
 
 
 class cmd_info(Command):
-    """Show statistical information for this branch"""
-    def run(self):
+    """Show statistical information about a branch."""
+    takes_args = ['branch?']
+    
+    def run(self, branch=None):
         import info
-        info.show_info(Branch('.'))        
+
+        from branch import find_branch
+        b = find_branch(branch)
+        info.show_info(b)
 
 
 class cmd_remove(Command):



More information about the Pkg-bazaar-commits mailing list