summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-12-02 02:26:32 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-12-02 02:26:32 +0000
commit06c079f079a0bff2d3a3565d259bb34cdbf91d69 (patch)
tree2da8956d39c5bccc9ee495375bb01c43dcc0b640
parent88625e1f89428d115c1c5a581286df8708cd5e6a (diff)
downloadbcfg2-06c079f079a0bff2d3a3565d259bb34cdbf91d69.tar.gz
bcfg2-06c079f079a0bff2d3a3565d259bb34cdbf91d69.tar.bz2
bcfg2-06c079f079a0bff2d3a3565d259bb34cdbf91d69.zip
Add stable-check script (for [bugfix] branch)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4023 ce84e21b-d406-0410-9b95-82705330c041
-rwxr-xr-xtools/stable-check.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/stable-check.py b/tools/stable-check.py
new file mode 100755
index 000000000..dbd062330
--- /dev/null
+++ b/tools/stable-check.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+import os, sys
+
+def do_merge(revision_string):
+ os.system("svnmerge merge -r %s" % revision_string)
+ os.system("svn commit -F svnmerge-commit-message.txt")
+ os.system("svn up")
+
+if __name__ == '__main__':
+ os.popen('svn up').read()
+ avail = os.popen('svnmerge avail').read().strip()
+ if not avail:
+ raise SystemExit, 0
+ start, stop = [int(x) for x in avail.split('-')]
+
+ bf = []
+ other = []
+ for rev in range(start, stop + 1):
+ log = os.popen("svn log https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2 -r %s" % rev).read()
+ if "[bugfix]" in log:
+ bf.append(rev)
+ else:
+ other.append(rev)
+ if '-v' in sys.argv:
+ print log,
+
+ mrevs = ','.join([str(x) for x in bf])
+ if '-c' in sys.argv:
+ print "Revisions %s need merging" % (mrevs)
+ elif '-f' in sys.argv:
+ do_merge(mrevs)
+ else:
+ a = raw_input('Merge revisions %s: [yN] ' % mrevs)
+ if a in ['y', 'Y']:
+ do_merge(mrevs)