gbp-post-tag-push: Add --verbose option
authorGuido Günther <agx@sigxcpu.org>
Tue, 10 Jan 2012 19:31:53 +0000 (20:31 +0100)
committerGuido Günther <agx@sigxcpu.org>
Tue, 10 Jan 2012 19:32:46 +0000 (20:32 +0100)
to ease debugging

examples/gbp-posttag-push

index 521d235..1203983 100755 (executable)
 #
 # Options:
 # -d: dry-run
+# -u: push upstream branch too, if not on remote already
+# --verbose: verbose command output
+
 
 import ConfigParser
 import os
 import subprocess
 import sys
 
+import gbp.log
 from gbp.config import GbpOptionParser
 from gbp.deb.git import DebianGitRepository
 
 
+
 class Env(object):
     pass
 
@@ -92,9 +97,12 @@ def main(argv):
                                   dest="upstream_branch")
     parser.add_config_file_option(option_name="upstream-tag",
                                   dest="upstream_tag")
+    parser.add_option("--verbose", action="store_true", dest="verbose",
+                      default=False, help="verbose command execution")
 
     (options, args) = parser.parse_args()
 
+    gbp.log.setup(False, options.verbose)
     repo = DebianGitRepository('.')
 
     if options.dryrun: