[Libreoffice-commits] dev-tools.git: bibisect/mergeranges

Robinson Tryon qubit at runcibility.com
Thu Jan 23 02:47:22 PST 2014


 bibisect/mergeranges |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 55f74ce5a10a4757981d4ee9766be8df01b517e9
Author: Robinson Tryon <qubit at runcibility.com>
Date:   Wed Dec 4 04:42:31 2013 -0500

    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 at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/bibisect/mergeranges b/bibisect/mergeranges
index 1dcb008..58dff4f 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)


More information about the Libreoffice-commits mailing list