Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-ssh-clone-r @ 4188:dd0d9bd91e0a
dirstate.statwalk: explicitly test for ignored directories
This removes a hack where we appended '/' to a dirname so that:
- it would not appear on the "dc" dict
- it would always be matched by the match function
This was a contorted way of checking if the directory was matched by
some hgignore pattern, and it would still fail with some uses of
--include/--exclude patterns.
Things would still work fine if we removed the check altogether and
just appended things to "work" directly, but then we would end up
walking ignored directories too, which could be quite a bit of work.
This allows further simplification of the match function returned by
util._matcher, and fixes walking the working directory with a
--include pattern that matches only the end of a name.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 10 Mar 2007 23:00:54 -0300 |
parents | c0b449154a90 |
children | 6b1e1b9da853 |
rev | line source |
---|---|
3449
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
1 #!/bin/sh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
3 # This test tries to exercise the ssh functionality with a dummy script |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
4 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
5 cat <<'EOF' > dummyssh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
6 #!/bin/sh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
7 # this attempts to deal with relative pathnames |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
8 cd `dirname $0` |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
9 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
10 # check for proper args |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
11 if [ $1 != "user@dummy" ] ; then |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
12 exit -1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
13 fi |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
14 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
15 # check that we're in the right directory |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
16 if [ ! -x dummyssh ] ; then |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
17 exit -1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
18 fi |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
19 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
20 SSH_CLIENT='127.0.0.1 1 2' |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
21 export SSH_CLIENT |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
22 echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
23 $2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
24 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
25 chmod +x dummyssh |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
26 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
27 hg init remote |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
28 cd remote |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
29 echo "# creating 'remote'" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
30 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
31 0 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
32 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
33 hg add afile |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
34 hg commit -m "0.0" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
35 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
36 1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
37 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
38 hg commit -m "0.1" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
39 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
40 2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
41 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
42 hg commit -m "0.2" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
43 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
44 3 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
45 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
46 hg commit -m "0.3" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
47 hg update -C 0 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
48 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
49 1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
50 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
51 hg commit -m "1.1" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
52 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
53 2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
54 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
55 hg commit -m "1.2" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
56 cat >fred <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
57 a line |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
58 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
59 cat >>afile <<EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
60 3 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
61 EOF |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
62 hg add fred |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
63 hg commit -m "1.3" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
64 hg mv afile adifferentfile |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
65 hg commit -m "1.3m" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
66 hg update -C 3 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
67 hg mv afile anotherfile |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
68 hg commit -m "0.3m" |
3853
c0b449154a90
switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3449
diff
changeset
|
69 hg debugindex .hg/store/data/afile.i |
c0b449154a90
switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3449
diff
changeset
|
70 hg debugindex .hg/store/data/adifferentfile.i |
c0b449154a90
switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3449
diff
changeset
|
71 hg debugindex .hg/store/data/anotherfile.i |
c0b449154a90
switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3449
diff
changeset
|
72 hg debugindex .hg/store/data/fred.i |
c0b449154a90
switch to the .hg/store layout, fix the tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
3449
diff
changeset
|
73 hg debugindex .hg/store/00manifest.i |
3449
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
74 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
75 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
76 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
77 echo "# clone remote via stream" |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
78 for i in 0 1 2 3 4 5 6 7 8; do |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
79 hg clone -e ./dummyssh --uncompressed -r "$i" ssh://user@dummy/remote test-"$i" 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
80 if cd test-"$i"; then |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
81 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
82 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
83 fi |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
84 done |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
85 cd test-8 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
86 hg pull ../test-7 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
87 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
88 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
89 cd test-1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
90 hg pull -e ../dummyssh -r 4 ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
91 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
92 hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
93 cd .. |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
94 cd test-2 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
95 hg pull -e ../dummyssh -r 5 ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
96 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
97 hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1 |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
98 hg verify |
c8686e3f0291
Testing the new changegroupsubset remote function in the ssh
Eric Hopper <hopper@omnifarious.org>
parents:
diff
changeset
|
99 cd .. |