Mercurial > hg
view tests/test-tags.out @ 11769:ca6cebd8734e stable
dirstate: ignore symlinks when fs cannot handle them (issue1888)
When the filesystem cannot handle the executable bit, we currently
ignore it completely when looking for modified files. Similarly, it is
impossible to set or clear the bit when the filesystem ignores it.
This patch makes Mercurial treat symbolic links the same way.
Symlinks are a little different since they manifest themselves as
small files containing a filename (the symlink target). On Windows,
these files show up as regular files, and on Linux and Mac they show
up as real symlinks.
Issue1888 presents a case where the symlink files are better ignored
from the Windows side. A Linux client creates symlinks in a working
copy which is shared over a network between Linux and Windows clients.
The Samba server is helpful and defererences the symlink when the
Windows client looks at it. This means that Mercurial on the Windows
side sees file content instead of a file name in the symlink, and
hence flags the link as modified. Ignoring the change would be much
more helpful, similarly to how Mercurial does not report any changes
when executable bits are ignored in a checkout on Windows.
An initial checkout of a symbolic link on a file system that cannot
handle symbolic links will still result in a regular file containing
the target file name as its content. Sharing such a checkout with a
Linux client will not turn the file into a symlink automatically, but
'hg revert' can fix that. After the revert, the Windows client will
see the correct file content (provided by the Samba server when it
follows the link on the Linux side) and otherwise ignore the change.
Running 'hg perfstatus' 10 times gives these results:
Before: After:
min: 0.544703 min: 0.546549
med: 0.547592 med: 0.548881
avg: 0.549146 avg: 0.548549
max: 0.564112 max: 0.551504
The median time is increased about 0.24%.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Mon, 09 Aug 2010 15:31:56 +0200 |
parents | 39e7f14a8286 |
children |
line wrap: on
line source
% setup no tag cache 000000000000 tip no tag cache 0 files updated, 0 files merged, 0 files removed, 0 files unresolved acb14030fe0a tip tag cache exists % create local tag with long name tip 0:acb14030fe0a This is a local tag with a really long name! 0:acb14030fe0a % create a tag behind hg's back acb14030fe0a21b60322c440ad2d20cf7685a376 first tip 1:b9154636be93 first 0:acb14030fe0a b9154636be93 tip % identify with cold cache b9154636be93 tip % identify with unwritable cache b9154636be93 tip % create a branch M a b9154636be93+ tip 0 files updated, 0 files merged, 1 files removed, 0 files unresolved acb14030fe0a+ first acb14030fe0a+ first M a created new head c8edf04160c7 tip % merge the two heads 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) c8edf04160c7+b9154636be93+ tip M .hgtags % create fake head, make sure tag not visible afterwards tip 6:35ff301afafe first 0:acb14030fe0a % add invalid tags committing .hgtags: acb14030fe0a21b60322c440ad2d20cf7685a376 first spam foo bar % report tag parse error on other head 1 files updated, 0 files merged, 0 files removed, 0 files unresolved created new head .hgtags@75d9f02dfe28, line 2: cannot parse entry .hgtags@75d9f02dfe28, line 4: node 'foo' is not well formed .hgtags@c4be69a18c11, line 2: node 'x' is not well formed tip 8:c4be69a18c11 first 0:acb14030fe0a changeset: 8:c4be69a18c11 tag: tip parent: 3:ac5e980c4dc0 user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: head % test tag precedence rules 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved created new head tip 4:0c192d7d5e6b bar 1:78391a272241 tip 4:0c192d7d5e6b bar 1:78391a272241 % detailed dump of tag info heads: 4:0c192d7d5e6b 3:6fa450212aeb 2:7a94127795a3 rev 2: .hgtags: bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar rev 3: .hgtags: bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar 78391a272241d70354aa14c874552cad6b51bb42 bar rev 4: .hgtags: bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar .hg/tags.cache: 4 0c192d7d5e6b78a714de54a2e9627952a877e25a 0c04f2a8af31de17fab7422878ee5a2dadbc943d 3 6fa450212aeb2a21ed616a54aea39a4a27894cd7 7d3b718c964ef37b89e550ebdafd5789e76ce1b0 2 7a94127795a33c10a370c93f731fd9fea0b79af6 0c04f2a8af31de17fab7422878ee5a2dadbc943d 78391a272241d70354aa14c874552cad6b51bb42 bar % test tag removal changeset: 5:5f6e8655b1c7 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 files: .hgtags description: Removed tag bar diff -r 0c192d7d5e6b -r 5f6e8655b1c7 .hgtags --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,3 @@ bbd179dfa0a71671c253b3ae0aa1513b60d199fa bar +78391a272241d70354aa14c874552cad6b51bb42 bar +0000000000000000000000000000000000000000 bar tip 5:5f6e8655b1c7 tip 5:5f6e8655b1c7 % remove nonexistent tag abort: tag 'foobar' does not exist changeset: 5:5f6e8655b1c7 tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Removed tag bar % rollback undoes tag operation rolling back to revision 4 (undo commit) tip 4:0c192d7d5e6b bar 1:78391a272241 tip 4:0c192d7d5e6b bar 1:78391a272241 % test tag rank tip 5:85f05169d91d bar 0:bbd179dfa0a7 1 files updated, 0 files merged, 0 files removed, 0 files unresolved created new head tip 6:735c3ca72986 bar 0:bbd179dfa0a7 % don't allow moving tag without -f abort: tag 'bar' already exists (use -f to force) tip 6:735c3ca72986 bar 0:bbd179dfa0a7 % strip 1: expose an old head tip 5:735c3ca72986 bar 1:78391a272241 tip 5:735c3ca72986 bar 1:78391a272241 % strip 2: destroy whole branch, no old head exposed tip 4:735c3ca72986 bar 0:bbd179dfa0a7 tip 4:735c3ca72986 bar 0:bbd179dfa0a7 % test tag rank with 3 heads adding foo tip 3:197c21bbbf2c bar 2:6fa450212aeb % bar should still point to rev 2 tip 4:3b4b14ed0202 bar 2:6fa450212aeb % remove local as global and global as local adding foo abort: tag 'localtag' is not a global tag abort: tag 'globaltag' is not a local tag tip 1:a0b6fe111088 localtag 0:bbd179dfa0a7 local globaltag 0:bbd179dfa0a7