[Libreoffice-commits] dev-tools.git: bibisect/mergeranges
Robinson Tryon
qubit at runcibility.com
Thu Jan 23 02:40:40 PST 2014
bibisect/mergeranges | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 293c386f096258d24cb34aaa38bd84f7ab3eb089
Author: Robinson Tryon <qubit at runcibility.com>
Date: Wed Dec 4 04:34:34 2013 -0500
Bibisect: Add comments and USAGE information to script
Change-Id: I5b2375aa60191c6067a0857a203b3d78fea5acd4
Reviewed-on: https://gerrit.libreoffice.org/6916
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 b35e951..6b6f84c 100755
--- a/bibisect/mergeranges
+++ b/bibisect/mergeranges
@@ -1,4 +1,9 @@
#!/usr/bin/env python3
+#
+# Bibisect: This tool may be used to merge ranges of bibisect commits.
+#
+# USAGE:
+# For usage information, please see the README.txt file
import sys
import subprocess
@@ -6,6 +11,8 @@ import subprocess
def justrunit(arglist):
print(subprocess.check_output(arglist).decode('utf-8'))
+# Given a commit hash, create (if necessary) and checkout branchName
+# at that hash.
def init_branch(startpoint):
global initBranch, branchName
@@ -25,10 +32,20 @@ def init_branch(startpoint):
# Pull a commit into the git repository.
def cherry_pick_theirs(revision):
try:
+ # Remove all files currently checked-in to git.
justrunit(['git', 'rm', '-rf', '.'])
except:
pass
+
+ # Check out the files from the given revision.
justrunit(['git', 'checkout', revision, '--', '.'])
+
+ # Reuse the log message and the authorship information when
+ # creating this commit.
+ #
+ # NOTE: Any untracked files in the repository (e.g. helper scripts
+ # such as 'bibisect.sh' or 'run-libreoffice.sh') will be left in
+ # place and not committed to the repository.
justrunit(['git', 'commit', '-C', revision])
tag = subprocess.check_output(['git', 'log', '-1', '--pretty=%s', 'HEAD']).decode('utf-8').rstrip()
justrunit(['git', 'tag', tag])
More information about the Libreoffice-commits
mailing list