[Pkg-bazaar-commits] ./bzr/unstable r113: More help for check command

mbp at sourcefrog.net mbp at sourcefrog.net
Fri Apr 10 07:44:16 UTC 2009


------------------------------------------------------------
revno: 113
committer: mbp at sourcefrog.net
timestamp: Mon 2005-03-28 12:49:46 +1000
message:
  More help for check command
modified:
  bzrlib/check.py
  bzrlib/commands.py
-------------- next part --------------
=== modified file 'bzrlib/check.py'
--- a/bzrlib/check.py	2005-03-09 04:08:15 +0000
+++ b/bzrlib/check.py	2005-03-28 02:49:46 +0000
@@ -1,10 +1,6 @@
-#! /usr/bin/python
-
-
 # Copyright (C) 2004, 2005 by Martin Pool
 # Copyright (C) 2005 by Canonical Ltd
 
-
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
@@ -25,7 +21,16 @@
 # consistency checks
 
 def check():
-    """Consistency check of tree."""
+    """check: Consistency check of branch history.
+
+usage: bzr check [-v] [BRANCH]
+
+options:
+  --verbose, -v         Show progress of checking.
+
+This command checks various invariants about the branch storage to
+detect data corruption or bzr bugs.
+"""
     assert_in_tree()
     mutter("checking tree")
     check_patches_exist()

=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-03-28 02:44:07 +0000
+++ b/bzrlib/commands.py	2005-03-28 02:49:46 +0000
@@ -441,9 +441,19 @@
     Branch('.').commit(message, verbose=verbose)
 
 
-def cmd_check():
-    """Check consistency of the branch."""
-    check()
+def cmd_check(dir='.'):
+    """check: Consistency check of branch history.
+
+usage: bzr check [-v] [BRANCH]
+
+options:
+  --verbose, -v         Show progress of checking.
+
+This command checks various invariants about the branch storage to
+detect data corruption or bzr bugs.
+"""
+    import bzrlib.check
+    bzrlib.check.check(Branch(dir, find_root=False))
 
 
 def cmd_is(pred, *rest):



More information about the Pkg-bazaar-commits mailing list