##// END OF EJS Templates
archive: set date to 1980 for very old zip files...
archive: set date to 1980 for very old zip files The zip file format stores the date using "MS-DOS format" which apparently means that they use 1980 as their epoch. Python's zipfile module emits deprecation warnings of this form /usr/lib/python2.6/zipfile.py:1108: DeprecationWarning: struct integer overflow masking is deprecated self.fp.write(zinfo.FileHeader()) /usr/lib/python2.6/zipfile.py:1108: DeprecationWarning: 'H' format requires 0 <= number <= 65535 self.fp.write(zinfo.FileHeader()) /home/mg/src/mercurial-crew/mercurial/archival.py:169: DeprecationWarning: struct integer overflow masking is deprecated self.z.close() /home/mg/src/mercurial-crew/mercurial/archival.py:169: DeprecationWarning: 'H' format requires 0 <= number <= 65535 self.z.close() when it is given such old timestamps. This fixes this by silently clamping the date to 1980.

File last commit:

r10637:7ce62865 stable
r12319:381f1312 stable
Show More
test-clone-update-order
66 lines | 1.1 KiB | text/plain | TextLexer
/ tests / test-clone-update-order
#!/bin/sh
echo
echo % prepare repo a
mkdir a
cd a
hg init
echo foo > bar
hg commit -Am default
hg up -r null
hg branch mine
echo hello > world
hg commit -Am hello
hg up -r null
hg branch other
echo good > bye
hg commit -Am other
hg up -r mine
echo % test -U -u
hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other
echo % test -U
hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b
echo % test -u .
hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b
echo % test -u 0
hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b
echo % test -u 1
hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b
echo % test -u 2
hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b
echo % test -r 0
hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
rm -rf ../b
echo % test -r mine ... mine is ignored
hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other
rm -rf ../b
echo % test -b default
hg clone .#other ../b -b default -b mine
rm -rf ../b
echo % test #other
hg clone .#other ../b
rm -rf ../b
echo % test tip
hg clone -U . ../c -r 1 -r 2 > /dev/null
hg clone ../c ../b
rm -rf ../b ../c
cd ..
rm -rf a
exit 0