Mercurial > hg
comparison tests/test-largefiles.t @ 15369:b4ea79f88268 stable
largefiles: bugfix for symlink handling with testcase
The code was using the size of a symlink's target, thus wrongly making symlinks
to large files into largefiles themselves. This can be demonstrated by
deleting the symlink and then doing an 'hg up' or 'hg up -C' to restore the
symlink.
author | Eli Carter <eli.carter@tektronix.com> |
---|---|
date | Wed, 26 Oct 2011 13:48:33 -0500 |
parents | 06b8db3f25c6 |
children | 8af6c6d91c92 |
comparison
equal
deleted
inserted
replaced
15367:b357a972d6cd | 15369:b4ea79f88268 |
---|---|
850 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 850 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
851 getting changed largefiles | 851 getting changed largefiles |
852 1 largefiles updated, 0 removed | 852 1 largefiles updated, 0 removed |
853 $ cd .. | 853 $ cd .. |
854 $ HOME="$ORIGHOME" | 854 $ HOME="$ORIGHOME" |
855 | |
856 Symlink to a large largefile should behave the same as a symlink to a normal file | |
857 $ hg init largesymlink | |
858 $ cd largesymlink | |
859 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null | |
860 $ hg add --large largefile | |
861 $ hg commit -m "commit a large file" | |
862 $ ln -s largefile largelink | |
863 $ hg add largelink | |
864 $ hg commit -m "commit a large symlink" | |
865 $ rm -f largelink | |
866 $ hg up >/dev/null | |
867 $ test -e largelink | |
868 [1] | |
869 $ test -L largelink | |
870 [1] | |
871 $ rm -f largelink # make next part of the test independent of the previous | |
872 $ hg up -C >/dev/null | |
873 $ test -e largelink | |
874 $ test -L largelink | |
875 $ cd .. | |
876 | |
877 |