summaryrefslogtreecommitdiff
path: root/bibisect
diff options
context:
space:
mode:
Diffstat (limited to 'bibisect')
-rwxr-xr-xbibisect/mergeranges31
-rw-r--r--bibisect/ranges3
2 files changed, 34 insertions, 0 deletions
diff --git a/bibisect/mergeranges b/bibisect/mergeranges
new file mode 100755
index 00000000..5d9b14a1
--- /dev/null
+++ b/bibisect/mergeranges
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+
+import sys
+import subprocess
+
+def justrunit(arglist):
+ print(subprocess.check_output(arglist).decode('utf-8'))
+
+def init_branch(startpoint):
+ justrunit(['git', 'checkout', '-b', 'mergeranges', startpoint])
+
+def cherry_pick_theirs(revision):
+ try:
+ justrunit(['git', 'rm', '-rf', '.'])
+ except:
+ pass
+ justrunit(['git', 'checkout', revision, '--', '.'])
+ justrunit(['git', 'commit', '-C', revision])
+ tag = subprocess.check_output(['git', 'log', '-1', '--pretty=%s', 'HEAD']).decode('utf-8').rstrip()
+ justrunit(['git', 'tag', tag])
+
+
+initBranch = False
+for line in open(sys.argv[1]).readlines():
+ revisions = [r for r in subprocess.check_output(['git', 'rev-list', '--reverse', line.rstrip()]).decode('utf-8').split('\n') if r.rstrip()]
+ for revision in revisions:
+ if not initBranch:
+ init_branch(revision)
+ initBranch = True
+ else:
+ cherry_pick_theirs(revision)
diff --git a/bibisect/ranges b/bibisect/ranges
new file mode 100644
index 00000000..f44af397
--- /dev/null
+++ b/bibisect/ranges
@@ -0,0 +1,3 @@
+50612eb408c515e3672952083b805be708d59c4a..remotes/bibisect35/master
+d38dc5cb288aeef58175a0d656091940a3f35ee5..remotes/bibisect36/master
+b4e60c226e714050f5ab0680669463b98ccd8ea8..remotes/bibisect40/master