##// 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:

r5710:026eb800 default
r12319:381f1312 stable
Show More
test-merge-types
39 lines | 643 B | text/plain | TextLexer
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 #!/bin/sh
hg init
echo a > a
Matt Mackall
add --debug to test-merge-types
r5701 hg ci -Amadd # 0
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503
chmod +x a
Matt Mackall
add --debug to test-merge-types
r5701 hg ci -mexecutable # 1
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503
hg up 0
rm a
ln -s symlink a
Matt Mackall
add --debug to test-merge-types
r5701 hg ci -msymlink # 2
hg merge --debug
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503
Matt Mackall
add --debug to test-merge-types
r5701 echo % symlink is local parent, executable is other
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503
Thomas Arendsen Hein
Use test -h instead of test -L for portability...
r5682 if [ -h a ]; then
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 echo a is a symlink
Thomas Arendsen Hein
Use common readlink.py instead of own implementations per test script.
r5683 $TESTDIR/readlink.py a
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 elif [ -x a ]; then
echo a is executable
Matt Mackall
update test-merge-types
r5710 else
echo "a has no flags (default for conflicts)"
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 fi
hg update -C 1
Matt Mackall
add --debug to test-merge-types
r5701 hg merge --debug
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503
Matt Mackall
add --debug to test-merge-types
r5701 echo % symlink is other parent, executable is local
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503
Thomas Arendsen Hein
Use test -h instead of test -L for portability...
r5682 if [ -h a ]; then
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 echo a is a symlink
Thomas Arendsen Hein
Use common readlink.py instead of own implementations per test script.
r5683 $TESTDIR/readlink.py a
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 elif [ -x a ]; then
echo a is executable
Matt Mackall
update test-merge-types
r5710 else
echo "a has no flags (default for conflicts)"
Bryan O'Sullivan
Test a merge of a symlink against an executable file....
r5503 fi