aboutsummaryrefslogtreecommitdiff
path: root/t/t9802-git-p4-filetype.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-01 12:40:10 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-01 12:40:10 -0800
commit97fbc23ad7bf13e4f4b74c6f9f98aaa65bd2117a (patch)
tree202cf21695faed41594221e6cdf03b26f64eff1f /t/t9802-git-p4-filetype.sh
parenta14daf8b9101225792341e4354699c5a2e30449a (diff)
parent2e4f04fae6810161c17bf456124b364ad927c499 (diff)
downloadgit-97fbc23ad7bf13e4f4b74c6f9f98aaa65bd2117a.tar.gz
git-97fbc23ad7bf13e4f4b74c6f9f98aaa65bd2117a.tar.xz
Merge branch 'bc/git-p4-for-python-2.4'
With small updates to remove dependency on newer features of Python, keep git-p4 usable with older Python. * bc/git-p4-for-python-2.4: INSTALL: git-p4 does not support Python 3 git-p4.py: support Python 2.4 git-p4.py: support Python 2.5
Diffstat (limited to 't/t9802-git-p4-filetype.sh')
-rwxr-xr-xt/t9802-git-p4-filetype.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/t/t9802-git-p4-filetype.sh b/t/t9802-git-p4-filetype.sh
index 21924dfd7..aae1a3f81 100755
--- a/t/t9802-git-p4-filetype.sh
+++ b/t/t9802-git-p4-filetype.sh
@@ -105,12 +105,13 @@ build_gendouble() {
cat >gendouble.py <<-\EOF
import sys
import struct
- import array
- s = array.array("c", '\0' * 26)
- struct.pack_into(">L", s, 0, 0x00051607) # AppleDouble
- struct.pack_into(">L", s, 4, 0x00020000) # version 2
- s.tofile(sys.stdout)
+ s = struct.pack(">LL18s",
+ 0x00051607, # AppleDouble
+ 0x00020000, # version 2
+ "" # pad to 26 bytes
+ )
+ sys.stdout.write(s)
EOF
}