Mercurial > hg
annotate tests/test-subrepo-svn.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 | 33119d0252c1 |
children |
rev | line source |
---|---|
10178 | 1 % create subversion repo |
2 Checked out revision 0. | |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
3 A src |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
4 A src/alpha |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
5 A externals |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
6 A externals/other |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
7 Adding externals |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
8 Adding externals/other |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
9 Adding src |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
10 Adding src/alpha |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
11 Transmitting file data .. |
10178 | 12 Committed revision 1. |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
13 At revision 1. |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
14 property 'svn:externals' set on 'src' |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
15 Sending src |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
16 |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
17 Committed revision 2. |
10178 | 18 % create hg repo |
19 % first revision, no sub | |
20 adding a | |
10457
4f38d03d4975
subrepo: make sure that the source path is stripped
David Soria Parra <dsp@php.net>
parents:
10273
diff
changeset
|
21 % add first svn sub with leading whitespaces |
10178 | 22 committing subrepository s |
23 % debugsub | |
24 path s | |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
25 source file:///root/svn-repo/src |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
26 revision 2 |
10178 | 27 |
28 % change file in svn and hg, commit | |
29 committing subrepository s | |
30 Sending s/alpha | |
31 Transmitting file data . | |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
32 Committed revision 3. |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
33 |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
34 Fetching external item into 's/externals' |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
35 External at revision 1. |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
36 |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
37 At revision 3. |
10178 | 38 path s |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
39 source file:///root/svn-repo/src |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
40 revision 3 |
10178 | 41 |
42 % should be empty despite change to s/a | |
43 | |
44 % add a commit from svn | |
45 U alpha | |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
46 |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
47 Fetching external item into 'externals' |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
48 A externals/other |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
49 Updated external to revision 1. |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
50 |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
51 Updated to revision 3. |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
52 property 'svn:mime-type' set on 'alpha' |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
53 Sending src/alpha |
10178 | 54 Transmitting file data . |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
55 Committed revision 4. |
10178 | 56 % this commit from hg will fail |
57 committing subrepository s | |
58 abort: svn: Commit failed (details follow): | |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
59 svn: File '/src/alpha' is out of date |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
60 % this commit fails because of meta changes |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
61 property 'svn:mime-type' set on 's/alpha' |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
62 committing subrepository s |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
63 abort: svn: Commit failed (details follow): |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
64 svn: File '/src/alpha' is out of date |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
65 % this commit fails because of externals changes |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
66 committing subrepository s |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
67 abort: cannot commit svn externals |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
68 % this commit fails because of externals meta changes |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
69 property 'svn:mime-type' set on 's/externals/other' |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
70 committing subrepository s |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
71 abort: cannot commit svn externals |
10178 | 72 |
73 % clone | |
74 updating to branch default | |
10954
33119d0252c1
subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents:
10457
diff
changeset
|
75 A tc/s/alpha |
33119d0252c1
subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents:
10457
diff
changeset
|
76 U tc/s |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
77 |
10954
33119d0252c1
subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents:
10457
diff
changeset
|
78 Fetching external item into 'tc/s/externals' |
33119d0252c1
subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents:
10457
diff
changeset
|
79 A tc/s/externals/other |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
80 Checked out external at revision 1. |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
81 |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
82 Checked out revision 3. |
10178 | 83 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
84 % debugsub in clone | |
85 path s | |
10273
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
86 source file:///root/svn-repo/src |
e898bc7810ad
subrepo: handle svn externals and meta changes (issue1982)
Patrick Mezard <pmezard@gmail.com>
parents:
10178
diff
changeset
|
87 revision 3 |
10954
33119d0252c1
subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents:
10457
diff
changeset
|
88 % verify subrepo is contained within the repo directory |
33119d0252c1
subrepo: fix repo root path handling in svn subrepo
Brett Cannon <brett@python.org>
parents:
10457
diff
changeset
|
89 True |