diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-09-22 02:26:10 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-09-22 21:34:28 +0200 |
commit | 23dbf63e2d1bf3a30a2b6563fc9bafde4ca157fb (patch) | |
tree | 2dfba75389103bb1a08ead45e9fd6ae21bf4c7f7 | |
parent | ce22882df7e00b22a735539791806264424033a7 (diff) | |
download | samba-23dbf63e2d1bf3a30a2b6563fc9bafde4ca157fb.tar.gz samba-23dbf63e2d1bf3a30a2b6563fc9bafde4ca157fb.tar.bz2 samba-23dbf63e2d1bf3a30a2b6563fc9bafde4ca157fb.zip |
script/autobuild.py: add --branch option
metze
-rwxr-xr-x | script/autobuild.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/script/autobuild.py b/script/autobuild.py index 1fd0bf40b2..9e5e4a303a 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -485,6 +485,8 @@ parser.add_option("", "--always-email", help="always send email, even on success action="store_true") parser.add_option("", "--daemon", help="daemonize after initial setup", action="store_true") +parser.add_option("", "--branch", help="the branch to work on (default=master)", + default="master", type='str') def email_failure(status, failed_task, failed_stage, failed_tag, errstr): @@ -612,13 +614,14 @@ while True: else: rebase_url = None if rebase_url is not None: - rebase_tree(rebase_url) + rebase_tree(rebase_url, rebase_branch=options.branch) except Exception: cleanup_list.append(gitroot + "/autobuild.pid") cleanup() - email_failure(-1, 'rebase', 'rebase', 'rebase', 'rebase on master failed') + email_failure(-1, 'rebase', 'rebase', 'rebase', + 'rebase on %s failed' % options.branch) sys.exit(1) - blist = buildlist(tasks, args, rebase_url) + blist = buildlist(tasks, args, rebase_url, rebase_branch=options.branch) if options.tail: blist.start_tail() (status, failed_task, failed_stage, failed_tag, errstr) = blist.run() @@ -642,9 +645,9 @@ if status == 0: print("Running passcmd: %s" % options.passcmd) run_cmd(options.passcmd, dir=test_master) if options.pushto is not None: - push_to(options.pushto) + push_to(options.pushto, push_branch=options.branch) elif options.push_master: - push_to(samba_master_ssh) + push_to(samba_master_ssh, push_branch=options.branch) if options.keeplogs: blist.tarlogs("logs.tar.gz") print("Logs in logs.tar.gz") |