Merge branch 'jk/autoident-test'
[gitweb.git] / t / lib-git-p4.sh
index 31d75ae0434221ba50f805eee718b910a9cf677a..2d753ab7e118e0905e63860cc4ee6ae4932f16c4 100644 (file)
@@ -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"
+}