summaryrefslogtreecommitdiff
path: root/t/lib-git-p4.sh
diff options
context:
space:
mode:
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"
+}