[Pkg-bazaar-commits] ./bzr/unstable r448: - bzr with no command now shows help, not just an error

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


------------------------------------------------------------
revno: 448
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Wed 2005-05-11 10:56:49 +1000
message:
  - bzr with no command now shows help, not just an error
modified:
  NEWS
  bzrlib/commands.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2005-05-10 08:22:18 +0000
+++ b/NEWS	2005-05-11 00:56:49 +0000
@@ -1,4 +1,10 @@
 bzr-0.0.5  NOT RELEASED YET
+  
+  CHANGES:
+
+    * ``bzr`` with no command now shows help rather than giving an
+      error.  Suggested by Michael Ellerman.
+
 
   ENHANCEMENTS:
 

=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-05-10 07:06:05 +0000
+++ b/bzrlib/commands.py	2005-05-11 00:56:49 +0000
@@ -1020,9 +1020,10 @@
             return 0
         cmd = str(args.pop(0))
     except IndexError:
-        log_error('usage: bzr COMMAND')
-        log_error('  try "bzr help"')
+        import help
+        help.help()
         return 1
+          
 
     canonical_cmd, cmd_class = get_cmd_class(cmd)
 



More information about the Pkg-bazaar-commits mailing list