annotate tests/test-copy2.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 e8d10d085f47
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4744
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
1 # should fail - foo is not managed
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
2 foo: not copying - file is not managed
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
3 abort: no files to copy
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
4 ? foo
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
5 # dry-run; print a warning that this is not a real copy; foo is added
4833
fc8b3e7cbf6b improve warning for hg add foo; hg mv foo bar
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4744
diff changeset
6 foo has not been committed yet, so no copy data will be stored for bar.
4744
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
7 A foo
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
8 # should print a warning that this is not a real copy; bar is added
4833
fc8b3e7cbf6b improve warning for hg add foo; hg mv foo bar
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4744
diff changeset
9 foo has not been committed yet, so no copy data will be stored for bar.
4744
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
10 A bar
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
11 # should print a warning that this is not a real copy; foo is added
4833
fc8b3e7cbf6b improve warning for hg add foo; hg mv foo bar
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4744
diff changeset
12 bar has not been committed yet, so no copy data will be stored for foo.
4744
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
13 A foo
11152
e8d10d085f47 cmdutil: Warn when trying to copy/rename --after to a nonexistant file.
Steve Losh <steve@stevelosh.com>
parents: 10490
diff changeset
14 # copy --after to a nonexistant target filename
e8d10d085f47 cmdutil: Warn when trying to copy/rename --after to a nonexistant file.
Steve Losh <steve@stevelosh.com>
parents: 10490
diff changeset
15 foo: not recording copy - dummy does not exist
4744
44e17f5029d0 Make hg add foo; hg mv foo bar work.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4743
diff changeset
16 # dry-run; should show that foo is clean
5764
8a5d8fb59ed2 Backed out changeset c2a21fe60994
Matt Mackall <mpm@selenic.com>
parents: 5762
diff changeset
17 C foo
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
18 # should show copy
4743
719c402258ee test-copy2: use status -C instead of debugstate | grep copy
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4677
diff changeset
19 A bar
719c402258ee test-copy2: use status -C instead of debugstate | grep copy
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4677
diff changeset
20 foo
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
21 # shouldn't show copy
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
22 # should match
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
23 rev offset length base linkrev nodeid p1 p2
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
24 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
3652
f4dece0f7016 refactor debugrenamed
Matt Mackall <mpm@selenic.com>
parents: 1127
diff changeset
25 bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
26 # should not be renamed
3652
f4dece0f7016 refactor debugrenamed
Matt Mackall <mpm@selenic.com>
parents: 1127
diff changeset
27 bar not renamed
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
28 # should show copy
4743
719c402258ee test-copy2: use status -C instead of debugstate | grep copy
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4677
diff changeset
29 M bar
719c402258ee test-copy2: use status -C instead of debugstate | grep copy
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4677
diff changeset
30 foo
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
31 # should show no parents for tip
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
32 rev offset length base linkrev nodeid p1 p2
10490
f2618cacb485 filelog: sort meta entries, ensure deterministic order
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 5764
diff changeset
33 0 0 69 0 1 7711d36246cc 000000000000 000000000000
f2618cacb485 filelog: sort meta entries, ensure deterministic order
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 5764
diff changeset
34 1 69 6 1 2 bdf70a2b8d03 7711d36246cc 000000000000
f2618cacb485 filelog: sort meta entries, ensure deterministic order
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 5764
diff changeset
35 2 75 81 1 3 b2558327ea8d 000000000000 000000000000
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
36 # should match
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
37 rev offset length base linkrev nodeid p1 p2
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
38 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
39 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000
3652
f4dece0f7016 refactor debugrenamed
Matt Mackall <mpm@selenic.com>
parents: 1127
diff changeset
40 bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
1117
30ab5b8ee8ec fix some rename/copy bugs
mpm@selenic.com
parents:
diff changeset
41 # should show no copies
4376
de612b5f8d59 Make copy --after work for files that have been hg added.
Brendan Cully <brendan@kublai.com>
parents: 3652
diff changeset
42 # copy --after on an added file
de612b5f8d59 Make copy --after work for files that have been hg added.
Brendan Cully <brendan@kublai.com>
parents: 3652
diff changeset
43 A baz
de612b5f8d59 Make copy --after work for files that have been hg added.
Brendan Cully <brendan@kublai.com>
parents: 3652
diff changeset
44 bar
4677
de8ec7e1753a dirstate.status: if a file is marked as copied, consider it modified
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4376
diff changeset
45 # foo was clean:
5764
8a5d8fb59ed2 Backed out changeset c2a21fe60994
Matt Mackall <mpm@selenic.com>
parents: 5762
diff changeset
46 C foo
4677
de8ec7e1753a dirstate.status: if a file is marked as copied, consider it modified
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4376
diff changeset
47 # but it's considered modified after a copy --after --force
de8ec7e1753a dirstate.status: if a file is marked as copied, consider it modified
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4376
diff changeset
48 M foo
de8ec7e1753a dirstate.status: if a file is marked as copied, consider it modified
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4376
diff changeset
49 bar