summaryrefslogtreecommitdiff
path: root/script/autobuild.py
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-26 11:46:01 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-26 19:51:02 +0000
commitcc79f092ba098543d253884dc9dc2be3c30cd282 (patch)
tree860594018bf08a736298b2ebf4ba3872934ce88a /script/autobuild.py
parent065fc8bc10de0c2bbb6f369bd03a70efc13ca12f (diff)
downloadsamba-cc79f092ba098543d253884dc9dc2be3c30cd282.tar.gz
samba-cc79f092ba098543d253884dc9dc2be3c30cd282.tar.bz2
samba-cc79f092ba098543d253884dc9dc2be3c30cd282.zip
autobuild: exit immediately if no changes from master
we don't need to test master in autobuild
Diffstat (limited to 'script/autobuild.py')
-rwxr-xr-xscript/autobuild.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/script/autobuild.py b/script/autobuild.py
index f75ccd7fff..856ea625e5 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -72,13 +72,17 @@ retry_task = [ '''set -e
done
''' % samba_master]
-def run_cmd(cmd, dir=".", show=None):
+def run_cmd(cmd, dir=".", show=None, output=False):
cwd = os.getcwd()
os.chdir(dir)
if show is None:
show = options.verbose
if show:
print("Running: '%s' in '%s'" % (cmd, dir))
+ if output:
+ ret = Popen([cmd], shell=True, stdout=PIPE).communicate()[0]
+ os.chdir(cwd)
+ return ret
ret = os.system(cmd)
os.chdir(cwd)
if ret != 0:
@@ -254,6 +258,10 @@ def rebase_tree(url):
run_cmd("git rebase --whitespace=fix master/master", show=True, dir=test_master)
else:
run_cmd("git rebase master/master", show=True, dir=test_master)
+ diff = run_cmd("git --no-pager diff HEAD master/master", dir=test_master, output=True)
+ if diff == '':
+ print("No differences between HEAD and master/master - exiting")
+ sys.exit(0)
def push_to(url):
print("Pushing to %s" % url)