[Libreoffice-commits] dev-tools.git: bibisect/mergeranges
Robinson Tryon
qubit at runcibility.com
Thu Jan 23 02:39:26 PST 2014
bibisect/mergeranges | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
New commits:
commit 7ac23e18c2cc61a7a20f1232263c6820c6e77922
Author: Robinson Tryon <qubit at runcibility.com>
Date: Wed Dec 4 04:56:10 2013 -0500
Bibisect: mergeranges: Allow merge into existing branch
This commit adds functionality to the 'mergeranges' script. It give us
the ability to add bibisect commits to an existing branch in a
repository. Previously, we could only start the merge process by
creating a new branch.
Change-Id: I436ac6490de6993ed57135b72c793f46150f7b07
Reviewed-on: https://gerrit.libreoffice.org/6921
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 5d9b14a..b35e951 100755
--- a/bibisect/mergeranges
+++ b/bibisect/mergeranges
@@ -7,8 +7,22 @@ def justrunit(arglist):
print(subprocess.check_output(arglist).decode('utf-8'))
def init_branch(startpoint):
- justrunit(['git', 'checkout', '-b', 'mergeranges', startpoint])
+ global initBranch, branchName
+ try:
+ justrunit(['git', 'checkout', branchName])
+ except CalledProcessError as e:
+ # If the branch does not exist, we need to create it.
+ justrunit(['git', 'checkout', '-b', branchName, startpoint])
+ print("Creating branch " + branchName)
+ else:
+ # If the branch already existed, we want to cherry-pick the
+ # 'startpoint' commit.
+ cherry_pick_theirs(startpoint)
+
+ initBranch = True
+
+# Pull a commit into the git repository.
def cherry_pick_theirs(revision):
try:
justrunit(['git', 'rm', '-rf', '.'])
@@ -26,6 +40,5 @@ for line in open(sys.argv[1]).readlines():
for revision in revisions:
if not initBranch:
init_branch(revision)
- initBranch = True
else:
cherry_pick_theirs(revision)
More information about the Libreoffice-commits
mailing list