summaryrefslogtreecommitdiff
path: root/t/lib-git-p4.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-14 04:22:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-14 04:22:12 (GMT)
commit7bdb74868cf51245bce6ab033a1588e312e87310 (patch)
treee4333aea5eae79bcf488916bd0a212e197f9a51b /t/lib-git-p4.sh
parentf06d47e7e0d9db709ee204ed13a8a7486149f494 (diff)
parentf19cb0a0e80e094970cfa854dc3da60c927830eb (diff)
downloadgit-7bdb74868cf51245bce6ab033a1588e312e87310.zip
git-7bdb74868cf51245bce6ab033a1588e312e87310.tar.gz
git-7bdb74868cf51245bce6ab033a1588e312e87310.tar.bz2
Merge branch 'pw/git-p4-jobs'
Teach "git p4" to notice "Jobs:" in the log message and relay it to Perforce to trigger its "jobs" support. # By Pete Wyckoff * pw/git-p4-jobs: git p4: notice Jobs lines in git commit messages git p4 test: refactor marshal_dump git p4: remove unused P4Submit interactive setting
Diffstat (limited to 't/lib-git-p4.sh')
-rw-r--r--t/lib-git-p4.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index 31d75ae..2d753ab 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -102,3 +102,16 @@ cleanup_git() {
rm -rf "$git" &&
mkdir "$git"
}
+
+marshal_dump() {
+ what=$1 &&
+ line=${2:-1} &&
+ cat >"$TRASH_DIRECTORY/marshal-dump.py" <<-EOF &&
+ import marshal
+ import sys
+ for i in range($line):
+ d = marshal.load(sys.stdin)
+ print d['$what']
+ EOF
+ "$PYTHON_PATH" "$TRASH_DIRECTORY/marshal-dump.py"
+}