summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobinson Tryon <qubit@runcibility.com>2013-12-04 04:42:31 -0500
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2014-01-23 10:47:04 +0000
commit55f74ce5a10a4757981d4ee9766be8df01b517e9 (patch)
tree439459062e717e4fc0a10b64c85eeabf74e16d5a
parentad1143a3b96388c58e7566da9a3c61e5801a3b24 (diff)
Bibisect: Tweak passed-in commit range to be inclusive
This commit tweaks the commit ranges passed-in via a 'ranges' file on the command line. Previously, git-rev-list would include the range as (oldest, latest], but now we include the range as [oldest, latest]. Change-Id: Iccb449ad4da4d521ecd2148902c991698c9865d7 Reviewed-on: https://gerrit.libreoffice.org/6918 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
-rwxr-xr-xbibisect/mergeranges9
1 files changed, 8 insertions, 1 deletions
diff --git a/bibisect/mergeranges b/bibisect/mergeranges
index 1dcb008a..58dff4fe 100755
--- a/bibisect/mergeranges
+++ b/bibisect/mergeranges
@@ -64,9 +64,16 @@ def cherry_pick_theirs(revision):
# Take input from the 'ranges' file passed-in on the command line.
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()]
+ print(line)
+
+ # Assemble a list of revisions in the given range.
+ argsRevRevList = ['git', 'rev-list', '--reverse',
+ # We have to modify the range to make it inclusive.
+ line.rstrip().replace("..", "^..")]
+ revisions = [r for r in subrun(argsRevRevList).split('\n') if r.rstrip()]
for revision in revisions:
if not initBranch:
+ print("init_branch: " + revision)
init_branch(revision)
else:
cherry_pick_theirs(revision)