Rev 3825: Add a bit of help text when supplying --help. in http://bzr.arbash-meinel.com/branches/bzr/1.10-dev/add_convert_to_1.9

John Arbash Meinel john at arbash-meinel.com
Tue Nov 25 17:15:45 GMT 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.10-dev/add_convert_to_1.9

------------------------------------------------------------
revno: 3825
revision-id: john at arbash-meinel.com-20081125171526-pi2g4m1w70pkie1f
parent: john at arbash-meinel.com-20081106182050-sd8irbbw8thsarta
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: add_convert_to_1.9
timestamp: Tue 2008-11-25 11:15:26 -0600
message:
  Add a bit of help text when supplying --help.
-------------- next part --------------
=== modified file 'contrib/convert_to_1.9.py'
--- a/contrib/convert_to_1.9.py	2008-11-06 18:20:50 +0000
+++ b/contrib/convert_to_1.9.py	2008-11-25 17:15:26 +0000
@@ -1,4 +1,12 @@
-# Convert a pack-0.92 repository into a 1.9 (btree) repository
+#!/usr/bin/env python
+"""Convert a pack-0.92 repository into a 1.9 (btree) repository.
+
+This works directly on the indices, rather than using the generic conversion
+logic. After conversion, it will have backed up your old indices to
+.bzr/repository/indices-gi. This is significantly faster than the generic 'bzr
+upgrade' but it does not work for all repository formats (only pack format
+repositories are supported).
+"""
 
 
 steps_to_revert = []
@@ -13,7 +21,7 @@
 
 def main(args):
     import optparse
-    p = optparse.OptionParser()
+    p = optparse.OptionParser(usage='%prog [options]\n' + __doc__)
 
     opts, args = p.parse_args(args)
 



More information about the bazaar-commits mailing list