##// END OF EJS Templates
tests: remove glob from output lines containing no glob character
Simon Heimberg -
r18682:408f2202 default
parent child Browse files
Show More
@@ -1,281 +1,281 b''
1 Proper https client requires the built-in ssl from Python 2.6.
1 Proper https client requires the built-in ssl from Python 2.6.
2
2
3 $ "$TESTDIR/hghave" serve ssl || exit 80
3 $ "$TESTDIR/hghave" serve ssl || exit 80
4
4
5 Certificates created with:
5 Certificates created with:
6 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
6 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
7 openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem
7 openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem
8 Can be dumped with:
8 Can be dumped with:
9 openssl x509 -in pub.pem -text
9 openssl x509 -in pub.pem -text
10
10
11 $ cat << EOT > priv.pem
11 $ cat << EOT > priv.pem
12 > -----BEGIN PRIVATE KEY-----
12 > -----BEGIN PRIVATE KEY-----
13 > MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEApjCWeYGrIa/Vo7LH
13 > MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEApjCWeYGrIa/Vo7LH
14 > aRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8
14 > aRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8
15 > j/xgSwIDAQABAkBxHC6+Qlf0VJXGlb6NL16yEVVTQxqDS6hA9zqu6TZjrr0YMfzc
15 > j/xgSwIDAQABAkBxHC6+Qlf0VJXGlb6NL16yEVVTQxqDS6hA9zqu6TZjrr0YMfzc
16 > EGNIiZGt7HCBL0zO+cPDg/LeCZc6HQhf0KrhAiEAzlJq4hWWzvguWFIJWSoBeBUG
16 > EGNIiZGt7HCBL0zO+cPDg/LeCZc6HQhf0KrhAiEAzlJq4hWWzvguWFIJWSoBeBUG
17 > MF1ACazQO7PYE8M0qfECIQDONHHP0SKZzz/ZwBZcAveC5K61f/v9hONFwbeYulzR
17 > MF1ACazQO7PYE8M0qfECIQDONHHP0SKZzz/ZwBZcAveC5K61f/v9hONFwbeYulzR
18 > +wIgc9SvbtgB/5Yzpp//4ZAEnR7oh5SClCvyB+KSx52K3nECICbhQphhoXmI10wy
18 > +wIgc9SvbtgB/5Yzpp//4ZAEnR7oh5SClCvyB+KSx52K3nECICbhQphhoXmI10wy
19 > aMTellaq0bpNMHFDziqH9RsqAHhjAiEAgYGxfzkftt5IUUn/iFK89aaIpyrpuaAh
19 > aMTellaq0bpNMHFDziqH9RsqAHhjAiEAgYGxfzkftt5IUUn/iFK89aaIpyrpuaAh
20 > HY8gUVkVRVs=
20 > HY8gUVkVRVs=
21 > -----END PRIVATE KEY-----
21 > -----END PRIVATE KEY-----
22 > EOT
22 > EOT
23
23
24 $ cat << EOT > pub.pem
24 $ cat << EOT > pub.pem
25 > -----BEGIN CERTIFICATE-----
25 > -----BEGIN CERTIFICATE-----
26 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
26 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
27 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
27 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
28 > MTAxNDIwMzAxNFoXDTM1MDYwNTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0
28 > MTAxNDIwMzAxNFoXDTM1MDYwNTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0
29 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
29 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
30 > ADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX
30 > ADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX
31 > 6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA+amm
31 > 6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA+amm
32 > r24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQw
32 > r24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQw
33 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAFArvQFiAZJgQczRsbYlG1xl
33 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAFArvQFiAZJgQczRsbYlG1xl
34 > t+truk37w5B3m3Ick1ntRcQrqs+hf0CO1q6Squ144geYaQ8CDirSR92fICELI1c=
34 > t+truk37w5B3m3Ick1ntRcQrqs+hf0CO1q6Squ144geYaQ8CDirSR92fICELI1c=
35 > -----END CERTIFICATE-----
35 > -----END CERTIFICATE-----
36 > EOT
36 > EOT
37 $ cat priv.pem pub.pem >> server.pem
37 $ cat priv.pem pub.pem >> server.pem
38 $ PRIV=`pwd`/server.pem
38 $ PRIV=`pwd`/server.pem
39
39
40 $ cat << EOT > pub-other.pem
40 $ cat << EOT > pub-other.pem
41 > -----BEGIN CERTIFICATE-----
41 > -----BEGIN CERTIFICATE-----
42 > MIIBqzCCAVWgAwIBAgIJALwZS731c/ORMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
42 > MIIBqzCCAVWgAwIBAgIJALwZS731c/ORMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
43 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
43 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
44 > MTAxNDIwNDUxNloXDTM1MDYwNTIwNDUxNlowMTESMBAGA1UEAwwJbG9jYWxob3N0
44 > MTAxNDIwNDUxNloXDTM1MDYwNTIwNDUxNlowMTESMBAGA1UEAwwJbG9jYWxob3N0
45 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
45 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
46 > ADBIAkEAsxsapLbHrqqUKuQBxdpK4G3m2LjtyrTSdpzzzFlecxd5yhNP6AyWrufo
46 > ADBIAkEAsxsapLbHrqqUKuQBxdpK4G3m2LjtyrTSdpzzzFlecxd5yhNP6AyWrufo
47 > K4VMGo2xlu9xOo88nDSUNSKPuD09MwIDAQABo1AwTjAdBgNVHQ4EFgQUoIB1iMhN
47 > K4VMGo2xlu9xOo88nDSUNSKPuD09MwIDAQABo1AwTjAdBgNVHQ4EFgQUoIB1iMhN
48 > y868rpQ2qk9dHnU6ebswHwYDVR0jBBgwFoAUoIB1iMhNy868rpQ2qk9dHnU6ebsw
48 > y868rpQ2qk9dHnU6ebswHwYDVR0jBBgwFoAUoIB1iMhNy868rpQ2qk9dHnU6ebsw
49 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJ544f125CsE7J2t55PdFaF6
49 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJ544f125CsE7J2t55PdFaF6
50 > bBlNBb91FCywBgSjhBjf+GG3TNPwrPdc3yqeq+hzJiuInqbOBv9abmMyq8Wsoig=
50 > bBlNBb91FCywBgSjhBjf+GG3TNPwrPdc3yqeq+hzJiuInqbOBv9abmMyq8Wsoig=
51 > -----END CERTIFICATE-----
51 > -----END CERTIFICATE-----
52 > EOT
52 > EOT
53
53
54 pub.pem patched with other notBefore / notAfter:
54 pub.pem patched with other notBefore / notAfter:
55
55
56 $ cat << EOT > pub-not-yet.pem
56 $ cat << EOT > pub-not-yet.pem
57 > -----BEGIN CERTIFICATE-----
57 > -----BEGIN CERTIFICATE-----
58 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
58 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
59 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTM1MDYwNTIwMzAxNFoXDTM1MDYw
59 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTM1MDYwNTIwMzAxNFoXDTM1MDYw
60 > NTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
60 > NTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
61 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
61 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
62 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
62 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
63 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
63 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
64 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJXV41gWnkgC7jcpPpFRSUSZaxyzrXmD1CIqQf0WgVDb
64 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJXV41gWnkgC7jcpPpFRSUSZaxyzrXmD1CIqQf0WgVDb
65 > /12E0vR2DuZitgzUYtBaofM81aTtc0a2/YsrmqePGm0=
65 > /12E0vR2DuZitgzUYtBaofM81aTtc0a2/YsrmqePGm0=
66 > -----END CERTIFICATE-----
66 > -----END CERTIFICATE-----
67 > EOT
67 > EOT
68 $ cat priv.pem pub-not-yet.pem > server-not-yet.pem
68 $ cat priv.pem pub-not-yet.pem > server-not-yet.pem
69
69
70 $ cat << EOT > pub-expired.pem
70 $ cat << EOT > pub-expired.pem
71 > -----BEGIN CERTIFICATE-----
71 > -----BEGIN CERTIFICATE-----
72 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
72 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
73 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEwMTAxNDIwMzAxNFoXDTEwMTAx
73 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEwMTAxNDIwMzAxNFoXDTEwMTAx
74 > NDIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
74 > NDIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
75 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
75 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
76 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
76 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
77 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
77 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
78 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJfk57DTRf2nUbYaMSlVAARxMNbFGOjQhAUtY400GhKt
78 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJfk57DTRf2nUbYaMSlVAARxMNbFGOjQhAUtY400GhKt
79 > 2uiKCNGKXVXD3AHWe13yHc5KttzbHQStE5Nm/DlWBWQ=
79 > 2uiKCNGKXVXD3AHWe13yHc5KttzbHQStE5Nm/DlWBWQ=
80 > -----END CERTIFICATE-----
80 > -----END CERTIFICATE-----
81 > EOT
81 > EOT
82 $ cat priv.pem pub-expired.pem > server-expired.pem
82 $ cat priv.pem pub-expired.pem > server-expired.pem
83
83
84 $ hg init test
84 $ hg init test
85 $ cd test
85 $ cd test
86 $ echo foo>foo
86 $ echo foo>foo
87 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
87 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
88 $ echo foo>foo.d/foo
88 $ echo foo>foo.d/foo
89 $ echo bar>foo.d/bAr.hg.d/BaR
89 $ echo bar>foo.d/bAr.hg.d/BaR
90 $ echo bar>foo.d/baR.d.hg/bAR
90 $ echo bar>foo.d/baR.d.hg/bAR
91 $ hg commit -A -m 1
91 $ hg commit -A -m 1
92 adding foo
92 adding foo
93 adding foo.d/bAr.hg.d/BaR
93 adding foo.d/bAr.hg.d/BaR
94 adding foo.d/baR.d.hg/bAR
94 adding foo.d/baR.d.hg/bAR
95 adding foo.d/foo
95 adding foo.d/foo
96 $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV
96 $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV
97 $ cat ../hg0.pid >> $DAEMON_PIDS
97 $ cat ../hg0.pid >> $DAEMON_PIDS
98
98
99 cacert not found
99 cacert not found
100
100
101 $ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/
101 $ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/
102 abort: could not find web.cacerts: no-such.pem
102 abort: could not find web.cacerts: no-such.pem
103 [255]
103 [255]
104
104
105 Test server address cannot be reused
105 Test server address cannot be reused
106
106
107 #if windows
107 #if windows
108 $ hg serve -p $HGPORT --certificate=$PRIV 2>&1
108 $ hg serve -p $HGPORT --certificate=$PRIV 2>&1
109 abort: cannot start server at ':$HGPORT': (glob)
109 abort: cannot start server at ':$HGPORT':
110 [255]
110 [255]
111 #else
111 #else
112 $ hg serve -p $HGPORT --certificate=$PRIV 2>&1
112 $ hg serve -p $HGPORT --certificate=$PRIV 2>&1
113 abort: cannot start server at ':$HGPORT': Address already in use
113 abort: cannot start server at ':$HGPORT': Address already in use
114 [255]
114 [255]
115 #endif
115 #endif
116 $ cd ..
116 $ cd ..
117
117
118 clone via pull
118 clone via pull
119
119
120 $ hg clone https://localhost:$HGPORT/ copy-pull
120 $ hg clone https://localhost:$HGPORT/ copy-pull
121 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
121 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
122 requesting all changes
122 requesting all changes
123 adding changesets
123 adding changesets
124 adding manifests
124 adding manifests
125 adding file changes
125 adding file changes
126 added 1 changesets with 4 changes to 4 files
126 added 1 changesets with 4 changes to 4 files
127 updating to branch default
127 updating to branch default
128 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
128 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 $ hg verify -R copy-pull
129 $ hg verify -R copy-pull
130 checking changesets
130 checking changesets
131 checking manifests
131 checking manifests
132 crosschecking files in changesets and manifests
132 crosschecking files in changesets and manifests
133 checking files
133 checking files
134 4 files, 1 changesets, 4 total revisions
134 4 files, 1 changesets, 4 total revisions
135 $ cd test
135 $ cd test
136 $ echo bar > bar
136 $ echo bar > bar
137 $ hg commit -A -d '1 0' -m 2
137 $ hg commit -A -d '1 0' -m 2
138 adding bar
138 adding bar
139 $ cd ..
139 $ cd ..
140
140
141 pull without cacert
141 pull without cacert
142
142
143 $ cd copy-pull
143 $ cd copy-pull
144 $ echo '[hooks]' >> .hg/hgrc
144 $ echo '[hooks]' >> .hg/hgrc
145 $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
145 $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
146 $ hg pull
146 $ hg pull
147 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
147 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
148 pulling from https://localhost:$HGPORT/
148 pulling from https://localhost:$HGPORT/
149 searching for changes
149 searching for changes
150 adding changesets
150 adding changesets
151 adding manifests
151 adding manifests
152 adding file changes
152 adding file changes
153 added 1 changesets with 1 changes to 1 files
153 added 1 changesets with 1 changes to 1 files
154 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
154 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
155 (run 'hg update' to get a working copy)
155 (run 'hg update' to get a working copy)
156 $ cd ..
156 $ cd ..
157
157
158 cacert configured in local repo
158 cacert configured in local repo
159
159
160 $ cp copy-pull/.hg/hgrc copy-pull/.hg/hgrc.bu
160 $ cp copy-pull/.hg/hgrc copy-pull/.hg/hgrc.bu
161 $ echo "[web]" >> copy-pull/.hg/hgrc
161 $ echo "[web]" >> copy-pull/.hg/hgrc
162 $ echo "cacerts=`pwd`/pub.pem" >> copy-pull/.hg/hgrc
162 $ echo "cacerts=`pwd`/pub.pem" >> copy-pull/.hg/hgrc
163 $ hg -R copy-pull pull --traceback
163 $ hg -R copy-pull pull --traceback
164 pulling from https://localhost:$HGPORT/
164 pulling from https://localhost:$HGPORT/
165 searching for changes
165 searching for changes
166 no changes found
166 no changes found
167 $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc
167 $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc
168
168
169 cacert configured globally, also testing expansion of environment
169 cacert configured globally, also testing expansion of environment
170 variables in the filename
170 variables in the filename
171
171
172 $ echo "[web]" >> $HGRCPATH
172 $ echo "[web]" >> $HGRCPATH
173 $ echo 'cacerts=$P/pub.pem' >> $HGRCPATH
173 $ echo 'cacerts=$P/pub.pem' >> $HGRCPATH
174 $ P=`pwd` hg -R copy-pull pull
174 $ P=`pwd` hg -R copy-pull pull
175 pulling from https://localhost:$HGPORT/
175 pulling from https://localhost:$HGPORT/
176 searching for changes
176 searching for changes
177 no changes found
177 no changes found
178 $ P=`pwd` hg -R copy-pull pull --insecure
178 $ P=`pwd` hg -R copy-pull pull --insecure
179 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
179 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
180 pulling from https://localhost:$HGPORT/
180 pulling from https://localhost:$HGPORT/
181 searching for changes
181 searching for changes
182 no changes found
182 no changes found
183
183
184 cacert mismatch
184 cacert mismatch
185
185
186 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
186 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
187 abort: 127.0.0.1 certificate error: certificate is for localhost
187 abort: 127.0.0.1 certificate error: certificate is for localhost
188 (configure hostfingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca or use --insecure to connect insecurely)
188 (configure hostfingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca or use --insecure to connect insecurely)
189 [255]
189 [255]
190 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure
190 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure
191 warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
191 warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
192 pulling from https://127.0.0.1:$HGPORT/
192 pulling from https://127.0.0.1:$HGPORT/
193 searching for changes
193 searching for changes
194 no changes found
194 no changes found
195 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
195 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
196 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
196 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
197 [255]
197 [255]
198 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure
198 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure
199 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
199 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
200 pulling from https://localhost:$HGPORT/
200 pulling from https://localhost:$HGPORT/
201 searching for changes
201 searching for changes
202 no changes found
202 no changes found
203
203
204 Test server cert which isn't valid yet
204 Test server cert which isn't valid yet
205
205
206 $ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem
206 $ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem
207 $ cat hg1.pid >> $DAEMON_PIDS
207 $ cat hg1.pid >> $DAEMON_PIDS
208 $ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/
208 $ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/
209 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
209 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
210 [255]
210 [255]
211
211
212 Test server cert which no longer is valid
212 Test server cert which no longer is valid
213
213
214 $ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem
214 $ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem
215 $ cat hg2.pid >> $DAEMON_PIDS
215 $ cat hg2.pid >> $DAEMON_PIDS
216 $ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
216 $ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
217 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
217 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
218 [255]
218 [255]
219
219
220 Fingerprints
220 Fingerprints
221
221
222 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
222 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
223 $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc
223 $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc
224 $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc
224 $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc
225
225
226 - works without cacerts
226 - works without cacerts
227 $ hg -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=
227 $ hg -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=
228 5fed3813f7f5
228 5fed3813f7f5
229
229
230 - fails when cert doesn't match hostname (port is ignored)
230 - fails when cert doesn't match hostname (port is ignored)
231 $ hg -R copy-pull id https://localhost:$HGPORT1/
231 $ hg -R copy-pull id https://localhost:$HGPORT1/
232 abort: certificate for localhost has unexpected fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b
232 abort: certificate for localhost has unexpected fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b
233 (check hostfingerprint configuration)
233 (check hostfingerprint configuration)
234 [255]
234 [255]
235
235
236
236
237 - ignores that certificate doesn't match hostname
237 - ignores that certificate doesn't match hostname
238 $ hg -R copy-pull id https://127.0.0.1:$HGPORT/
238 $ hg -R copy-pull id https://127.0.0.1:$HGPORT/
239 5fed3813f7f5
239 5fed3813f7f5
240
240
241 HGPORT1 is reused below for tinyproxy tests. Kill that server.
241 HGPORT1 is reused below for tinyproxy tests. Kill that server.
242 $ "$TESTDIR/killdaemons.py" hg1.pid
242 $ "$TESTDIR/killdaemons.py" hg1.pid
243
243
244 Prepare for connecting through proxy
244 Prepare for connecting through proxy
245
245
246 $ "$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log </dev/null 2>&1 &
246 $ "$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log </dev/null 2>&1 &
247 $ while [ ! -f proxy.pid ]; do sleep 0; done
247 $ while [ ! -f proxy.pid ]; do sleep 0; done
248 $ cat proxy.pid >> $DAEMON_PIDS
248 $ cat proxy.pid >> $DAEMON_PIDS
249
249
250 $ echo "[http_proxy]" >> copy-pull/.hg/hgrc
250 $ echo "[http_proxy]" >> copy-pull/.hg/hgrc
251 $ echo "always=True" >> copy-pull/.hg/hgrc
251 $ echo "always=True" >> copy-pull/.hg/hgrc
252 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
252 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
253 $ echo "localhost =" >> copy-pull/.hg/hgrc
253 $ echo "localhost =" >> copy-pull/.hg/hgrc
254
254
255 Test unvalidated https through proxy
255 Test unvalidated https through proxy
256
256
257 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback
257 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback
258 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
258 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
259 pulling from https://localhost:$HGPORT/
259 pulling from https://localhost:$HGPORT/
260 searching for changes
260 searching for changes
261 no changes found
261 no changes found
262
262
263 Test https with cacert and fingerprint through proxy
263 Test https with cacert and fingerprint through proxy
264
264
265 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub.pem
265 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub.pem
266 pulling from https://localhost:$HGPORT/
266 pulling from https://localhost:$HGPORT/
267 searching for changes
267 searching for changes
268 no changes found
268 no changes found
269 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/
269 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/
270 pulling from https://127.0.0.1:$HGPORT/
270 pulling from https://127.0.0.1:$HGPORT/
271 searching for changes
271 searching for changes
272 no changes found
272 no changes found
273
273
274 Test https with cert problems through proxy
274 Test https with cert problems through proxy
275
275
276 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem
276 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem
277 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
277 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
278 [255]
278 [255]
279 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
279 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
280 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
280 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
281 [255]
281 [255]
@@ -1,333 +1,333 b''
1 $ hg init t
1 $ hg init t
2 $ cd t
2 $ cd t
3 $ mkdir -p beans
3 $ mkdir -p beans
4 $ for b in kidney navy turtle borlotti black pinto; do
4 $ for b in kidney navy turtle borlotti black pinto; do
5 > echo $b > beans/$b
5 > echo $b > beans/$b
6 $ done
6 $ done
7 $ mkdir -p mammals/Procyonidae
7 $ mkdir -p mammals/Procyonidae
8 $ for m in cacomistle coatimundi raccoon; do
8 $ for m in cacomistle coatimundi raccoon; do
9 > echo $m > mammals/Procyonidae/$m
9 > echo $m > mammals/Procyonidae/$m
10 $ done
10 $ done
11 $ echo skunk > mammals/skunk
11 $ echo skunk > mammals/skunk
12 $ echo fennel > fennel
12 $ echo fennel > fennel
13 $ echo fenugreek > fenugreek
13 $ echo fenugreek > fenugreek
14 $ echo fiddlehead > fiddlehead
14 $ echo fiddlehead > fiddlehead
15 $ hg addremove
15 $ hg addremove
16 adding beans/black
16 adding beans/black
17 adding beans/borlotti
17 adding beans/borlotti
18 adding beans/kidney
18 adding beans/kidney
19 adding beans/navy
19 adding beans/navy
20 adding beans/pinto
20 adding beans/pinto
21 adding beans/turtle
21 adding beans/turtle
22 adding fennel
22 adding fennel
23 adding fenugreek
23 adding fenugreek
24 adding fiddlehead
24 adding fiddlehead
25 adding mammals/Procyonidae/cacomistle
25 adding mammals/Procyonidae/cacomistle
26 adding mammals/Procyonidae/coatimundi
26 adding mammals/Procyonidae/coatimundi
27 adding mammals/Procyonidae/raccoon
27 adding mammals/Procyonidae/raccoon
28 adding mammals/skunk
28 adding mammals/skunk
29 $ hg commit -m "commit #0"
29 $ hg commit -m "commit #0"
30
30
31 $ hg debugwalk
31 $ hg debugwalk
32 f beans/black beans/black
32 f beans/black beans/black
33 f beans/borlotti beans/borlotti
33 f beans/borlotti beans/borlotti
34 f beans/kidney beans/kidney
34 f beans/kidney beans/kidney
35 f beans/navy beans/navy
35 f beans/navy beans/navy
36 f beans/pinto beans/pinto
36 f beans/pinto beans/pinto
37 f beans/turtle beans/turtle
37 f beans/turtle beans/turtle
38 f fennel fennel
38 f fennel fennel
39 f fenugreek fenugreek
39 f fenugreek fenugreek
40 f fiddlehead fiddlehead
40 f fiddlehead fiddlehead
41 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
41 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
42 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
42 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
43 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
43 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
44 f mammals/skunk mammals/skunk
44 f mammals/skunk mammals/skunk
45 $ hg debugwalk -I.
45 $ hg debugwalk -I.
46 f beans/black beans/black
46 f beans/black beans/black
47 f beans/borlotti beans/borlotti
47 f beans/borlotti beans/borlotti
48 f beans/kidney beans/kidney
48 f beans/kidney beans/kidney
49 f beans/navy beans/navy
49 f beans/navy beans/navy
50 f beans/pinto beans/pinto
50 f beans/pinto beans/pinto
51 f beans/turtle beans/turtle
51 f beans/turtle beans/turtle
52 f fennel fennel
52 f fennel fennel
53 f fenugreek fenugreek
53 f fenugreek fenugreek
54 f fiddlehead fiddlehead
54 f fiddlehead fiddlehead
55 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
55 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
56 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
56 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
57 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
57 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
58 f mammals/skunk mammals/skunk
58 f mammals/skunk mammals/skunk
59
59
60 $ cd mammals
60 $ cd mammals
61 $ hg debugwalk
61 $ hg debugwalk
62 f beans/black ../beans/black
62 f beans/black ../beans/black
63 f beans/borlotti ../beans/borlotti
63 f beans/borlotti ../beans/borlotti
64 f beans/kidney ../beans/kidney
64 f beans/kidney ../beans/kidney
65 f beans/navy ../beans/navy
65 f beans/navy ../beans/navy
66 f beans/pinto ../beans/pinto
66 f beans/pinto ../beans/pinto
67 f beans/turtle ../beans/turtle
67 f beans/turtle ../beans/turtle
68 f fennel ../fennel
68 f fennel ../fennel
69 f fenugreek ../fenugreek
69 f fenugreek ../fenugreek
70 f fiddlehead ../fiddlehead
70 f fiddlehead ../fiddlehead
71 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
71 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
72 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
72 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
73 f mammals/Procyonidae/raccoon Procyonidae/raccoon
73 f mammals/Procyonidae/raccoon Procyonidae/raccoon
74 f mammals/skunk skunk
74 f mammals/skunk skunk
75 $ hg debugwalk -X ../beans
75 $ hg debugwalk -X ../beans
76 f fennel ../fennel
76 f fennel ../fennel
77 f fenugreek ../fenugreek
77 f fenugreek ../fenugreek
78 f fiddlehead ../fiddlehead
78 f fiddlehead ../fiddlehead
79 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
79 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
80 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
80 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
81 f mammals/Procyonidae/raccoon Procyonidae/raccoon
81 f mammals/Procyonidae/raccoon Procyonidae/raccoon
82 f mammals/skunk skunk
82 f mammals/skunk skunk
83 $ hg debugwalk -I '*k'
83 $ hg debugwalk -I '*k'
84 f mammals/skunk skunk
84 f mammals/skunk skunk
85 $ hg debugwalk -I 'glob:*k'
85 $ hg debugwalk -I 'glob:*k'
86 f mammals/skunk skunk
86 f mammals/skunk skunk
87 $ hg debugwalk -I 'relglob:*k'
87 $ hg debugwalk -I 'relglob:*k'
88 f beans/black ../beans/black
88 f beans/black ../beans/black
89 f fenugreek ../fenugreek
89 f fenugreek ../fenugreek
90 f mammals/skunk skunk
90 f mammals/skunk skunk
91 $ hg debugwalk -I 'relglob:*k' .
91 $ hg debugwalk -I 'relglob:*k' .
92 f mammals/skunk skunk
92 f mammals/skunk skunk
93 $ hg debugwalk -I 're:.*k$'
93 $ hg debugwalk -I 're:.*k$'
94 f beans/black ../beans/black
94 f beans/black ../beans/black
95 f fenugreek ../fenugreek
95 f fenugreek ../fenugreek
96 f mammals/skunk skunk
96 f mammals/skunk skunk
97 $ hg debugwalk -I 'relre:.*k$'
97 $ hg debugwalk -I 'relre:.*k$'
98 f beans/black ../beans/black
98 f beans/black ../beans/black
99 f fenugreek ../fenugreek
99 f fenugreek ../fenugreek
100 f mammals/skunk skunk
100 f mammals/skunk skunk
101 $ hg debugwalk -I 'path:beans'
101 $ hg debugwalk -I 'path:beans'
102 f beans/black ../beans/black
102 f beans/black ../beans/black
103 f beans/borlotti ../beans/borlotti
103 f beans/borlotti ../beans/borlotti
104 f beans/kidney ../beans/kidney
104 f beans/kidney ../beans/kidney
105 f beans/navy ../beans/navy
105 f beans/navy ../beans/navy
106 f beans/pinto ../beans/pinto
106 f beans/pinto ../beans/pinto
107 f beans/turtle ../beans/turtle
107 f beans/turtle ../beans/turtle
108 $ hg debugwalk -I 'relpath:detour/../../beans'
108 $ hg debugwalk -I 'relpath:detour/../../beans'
109 f beans/black ../beans/black
109 f beans/black ../beans/black
110 f beans/borlotti ../beans/borlotti
110 f beans/borlotti ../beans/borlotti
111 f beans/kidney ../beans/kidney
111 f beans/kidney ../beans/kidney
112 f beans/navy ../beans/navy
112 f beans/navy ../beans/navy
113 f beans/pinto ../beans/pinto
113 f beans/pinto ../beans/pinto
114 f beans/turtle ../beans/turtle
114 f beans/turtle ../beans/turtle
115 $ hg debugwalk .
115 $ hg debugwalk .
116 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
116 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
117 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
117 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
118 f mammals/Procyonidae/raccoon Procyonidae/raccoon
118 f mammals/Procyonidae/raccoon Procyonidae/raccoon
119 f mammals/skunk skunk
119 f mammals/skunk skunk
120 $ hg debugwalk -I.
120 $ hg debugwalk -I.
121 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
121 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
122 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
122 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
123 f mammals/Procyonidae/raccoon Procyonidae/raccoon
123 f mammals/Procyonidae/raccoon Procyonidae/raccoon
124 f mammals/skunk skunk
124 f mammals/skunk skunk
125 $ hg debugwalk Procyonidae
125 $ hg debugwalk Procyonidae
126 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
126 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
127 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
127 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
128 f mammals/Procyonidae/raccoon Procyonidae/raccoon
128 f mammals/Procyonidae/raccoon Procyonidae/raccoon
129
129
130 $ cd Procyonidae
130 $ cd Procyonidae
131 $ hg debugwalk .
131 $ hg debugwalk .
132 f mammals/Procyonidae/cacomistle cacomistle
132 f mammals/Procyonidae/cacomistle cacomistle
133 f mammals/Procyonidae/coatimundi coatimundi
133 f mammals/Procyonidae/coatimundi coatimundi
134 f mammals/Procyonidae/raccoon raccoon
134 f mammals/Procyonidae/raccoon raccoon
135 $ hg debugwalk ..
135 $ hg debugwalk ..
136 f mammals/Procyonidae/cacomistle cacomistle
136 f mammals/Procyonidae/cacomistle cacomistle
137 f mammals/Procyonidae/coatimundi coatimundi
137 f mammals/Procyonidae/coatimundi coatimundi
138 f mammals/Procyonidae/raccoon raccoon
138 f mammals/Procyonidae/raccoon raccoon
139 f mammals/skunk ../skunk
139 f mammals/skunk ../skunk
140 $ cd ..
140 $ cd ..
141
141
142 $ hg debugwalk ../beans
142 $ hg debugwalk ../beans
143 f beans/black ../beans/black
143 f beans/black ../beans/black
144 f beans/borlotti ../beans/borlotti
144 f beans/borlotti ../beans/borlotti
145 f beans/kidney ../beans/kidney
145 f beans/kidney ../beans/kidney
146 f beans/navy ../beans/navy
146 f beans/navy ../beans/navy
147 f beans/pinto ../beans/pinto
147 f beans/pinto ../beans/pinto
148 f beans/turtle ../beans/turtle
148 f beans/turtle ../beans/turtle
149 $ hg debugwalk .
149 $ hg debugwalk .
150 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
150 f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
151 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
151 f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
152 f mammals/Procyonidae/raccoon Procyonidae/raccoon
152 f mammals/Procyonidae/raccoon Procyonidae/raccoon
153 f mammals/skunk skunk
153 f mammals/skunk skunk
154 $ hg debugwalk .hg
154 $ hg debugwalk .hg
155 abort: path 'mammals/.hg' is inside nested repo 'mammals' (glob)
155 abort: path 'mammals/.hg' is inside nested repo 'mammals' (glob)
156 [255]
156 [255]
157 $ hg debugwalk ../.hg
157 $ hg debugwalk ../.hg
158 abort: path contains illegal component: .hg (glob)
158 abort: path contains illegal component: .hg
159 [255]
159 [255]
160 $ cd ..
160 $ cd ..
161
161
162 $ hg debugwalk -Ibeans
162 $ hg debugwalk -Ibeans
163 f beans/black beans/black
163 f beans/black beans/black
164 f beans/borlotti beans/borlotti
164 f beans/borlotti beans/borlotti
165 f beans/kidney beans/kidney
165 f beans/kidney beans/kidney
166 f beans/navy beans/navy
166 f beans/navy beans/navy
167 f beans/pinto beans/pinto
167 f beans/pinto beans/pinto
168 f beans/turtle beans/turtle
168 f beans/turtle beans/turtle
169 $ hg debugwalk -I '{*,{b,m}*/*}k'
169 $ hg debugwalk -I '{*,{b,m}*/*}k'
170 f beans/black beans/black
170 f beans/black beans/black
171 f fenugreek fenugreek
171 f fenugreek fenugreek
172 f mammals/skunk mammals/skunk
172 f mammals/skunk mammals/skunk
173 $ hg debugwalk 'glob:mammals/../beans/b*'
173 $ hg debugwalk 'glob:mammals/../beans/b*'
174 f beans/black beans/black
174 f beans/black beans/black
175 f beans/borlotti beans/borlotti
175 f beans/borlotti beans/borlotti
176 $ hg debugwalk '-X*/Procyonidae' mammals
176 $ hg debugwalk '-X*/Procyonidae' mammals
177 f mammals/skunk mammals/skunk
177 f mammals/skunk mammals/skunk
178 $ hg debugwalk path:mammals
178 $ hg debugwalk path:mammals
179 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
179 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
180 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
180 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
181 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
181 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
182 f mammals/skunk mammals/skunk
182 f mammals/skunk mammals/skunk
183 $ hg debugwalk ..
183 $ hg debugwalk ..
184 abort: .. not under root '$TESTTMP/t' (glob)
184 abort: .. not under root '$TESTTMP/t' (glob)
185 [255]
185 [255]
186 $ hg debugwalk beans/../..
186 $ hg debugwalk beans/../..
187 abort: beans/../.. not under root '$TESTTMP/t' (glob)
187 abort: beans/../.. not under root '$TESTTMP/t' (glob)
188 [255]
188 [255]
189 $ hg debugwalk .hg
189 $ hg debugwalk .hg
190 abort: path contains illegal component: .hg (glob)
190 abort: path contains illegal component: .hg
191 [255]
191 [255]
192 $ hg debugwalk beans/../.hg
192 $ hg debugwalk beans/../.hg
193 abort: path contains illegal component: .hg (glob)
193 abort: path contains illegal component: .hg
194 [255]
194 [255]
195 $ hg debugwalk beans/../.hg/data
195 $ hg debugwalk beans/../.hg/data
196 abort: path contains illegal component: .hg/data (glob)
196 abort: path contains illegal component: .hg/data (glob)
197 [255]
197 [255]
198 $ hg debugwalk beans/.hg
198 $ hg debugwalk beans/.hg
199 abort: path 'beans/.hg' is inside nested repo 'beans' (glob)
199 abort: path 'beans/.hg' is inside nested repo 'beans' (glob)
200 [255]
200 [255]
201
201
202 Test absolute paths:
202 Test absolute paths:
203
203
204 $ hg debugwalk `pwd`/beans
204 $ hg debugwalk `pwd`/beans
205 f beans/black beans/black
205 f beans/black beans/black
206 f beans/borlotti beans/borlotti
206 f beans/borlotti beans/borlotti
207 f beans/kidney beans/kidney
207 f beans/kidney beans/kidney
208 f beans/navy beans/navy
208 f beans/navy beans/navy
209 f beans/pinto beans/pinto
209 f beans/pinto beans/pinto
210 f beans/turtle beans/turtle
210 f beans/turtle beans/turtle
211 $ hg debugwalk `pwd`/..
211 $ hg debugwalk `pwd`/..
212 abort: $TESTTMP/t/.. not under root '$TESTTMP/t' (glob)
212 abort: $TESTTMP/t/.. not under root '$TESTTMP/t' (glob)
213 [255]
213 [255]
214
214
215 Test patterns:
215 Test patterns:
216
216
217 $ hg debugwalk glob:\*
217 $ hg debugwalk glob:\*
218 f fennel fennel
218 f fennel fennel
219 f fenugreek fenugreek
219 f fenugreek fenugreek
220 f fiddlehead fiddlehead
220 f fiddlehead fiddlehead
221 #if eol-in-paths
221 #if eol-in-paths
222 $ echo glob:glob > glob:glob
222 $ echo glob:glob > glob:glob
223 $ hg addremove
223 $ hg addremove
224 adding glob:glob
224 adding glob:glob
225 warning: filename contains ':', which is reserved on Windows: 'glob:glob'
225 warning: filename contains ':', which is reserved on Windows: 'glob:glob'
226 $ hg debugwalk glob:\*
226 $ hg debugwalk glob:\*
227 f fennel fennel
227 f fennel fennel
228 f fenugreek fenugreek
228 f fenugreek fenugreek
229 f fiddlehead fiddlehead
229 f fiddlehead fiddlehead
230 f glob:glob glob:glob
230 f glob:glob glob:glob
231 $ hg debugwalk glob:glob
231 $ hg debugwalk glob:glob
232 glob: No such file or directory
232 glob: No such file or directory
233 $ hg debugwalk glob:glob:glob
233 $ hg debugwalk glob:glob:glob
234 f glob:glob glob:glob exact
234 f glob:glob glob:glob exact
235 $ hg debugwalk path:glob:glob
235 $ hg debugwalk path:glob:glob
236 f glob:glob glob:glob exact
236 f glob:glob glob:glob exact
237 $ rm glob:glob
237 $ rm glob:glob
238 $ hg addremove
238 $ hg addremove
239 removing glob:glob
239 removing glob:glob
240 #endif
240 #endif
241
241
242 $ hg debugwalk 'glob:**e'
242 $ hg debugwalk 'glob:**e'
243 f beans/turtle beans/turtle
243 f beans/turtle beans/turtle
244 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
244 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
245
245
246 $ hg debugwalk 're:.*[kb]$'
246 $ hg debugwalk 're:.*[kb]$'
247 f beans/black beans/black
247 f beans/black beans/black
248 f fenugreek fenugreek
248 f fenugreek fenugreek
249 f mammals/skunk mammals/skunk
249 f mammals/skunk mammals/skunk
250
250
251 $ hg debugwalk path:beans/black
251 $ hg debugwalk path:beans/black
252 f beans/black beans/black exact
252 f beans/black beans/black exact
253 $ hg debugwalk path:beans//black
253 $ hg debugwalk path:beans//black
254 f beans/black beans/black exact
254 f beans/black beans/black exact
255
255
256 $ hg debugwalk relglob:Procyonidae
256 $ hg debugwalk relglob:Procyonidae
257 $ hg debugwalk 'relglob:Procyonidae/**'
257 $ hg debugwalk 'relglob:Procyonidae/**'
258 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
258 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
259 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
259 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
260 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
260 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
261 $ hg debugwalk 'relglob:Procyonidae/**' fennel
261 $ hg debugwalk 'relglob:Procyonidae/**' fennel
262 f fennel fennel exact
262 f fennel fennel exact
263 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
263 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
264 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
264 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
265 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
265 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
266 $ hg debugwalk beans 'glob:beans/*'
266 $ hg debugwalk beans 'glob:beans/*'
267 f beans/black beans/black
267 f beans/black beans/black
268 f beans/borlotti beans/borlotti
268 f beans/borlotti beans/borlotti
269 f beans/kidney beans/kidney
269 f beans/kidney beans/kidney
270 f beans/navy beans/navy
270 f beans/navy beans/navy
271 f beans/pinto beans/pinto
271 f beans/pinto beans/pinto
272 f beans/turtle beans/turtle
272 f beans/turtle beans/turtle
273 $ hg debugwalk 'glob:mamm**'
273 $ hg debugwalk 'glob:mamm**'
274 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
274 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
275 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
275 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
276 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
276 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
277 f mammals/skunk mammals/skunk
277 f mammals/skunk mammals/skunk
278 $ hg debugwalk 'glob:mamm**' fennel
278 $ hg debugwalk 'glob:mamm**' fennel
279 f fennel fennel exact
279 f fennel fennel exact
280 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
280 f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
281 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
281 f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
282 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
282 f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
283 f mammals/skunk mammals/skunk
283 f mammals/skunk mammals/skunk
284 $ hg debugwalk 'glob:j*'
284 $ hg debugwalk 'glob:j*'
285 $ hg debugwalk NOEXIST
285 $ hg debugwalk NOEXIST
286 NOEXIST: * (glob)
286 NOEXIST: * (glob)
287
287
288 #if fifo
288 #if fifo
289 $ mkfifo fifo
289 $ mkfifo fifo
290 $ hg debugwalk fifo
290 $ hg debugwalk fifo
291 fifo: unsupported file type (type is fifo)
291 fifo: unsupported file type (type is fifo)
292 #endif
292 #endif
293
293
294 $ rm fenugreek
294 $ rm fenugreek
295 $ hg debugwalk fenugreek
295 $ hg debugwalk fenugreek
296 f fenugreek fenugreek exact
296 f fenugreek fenugreek exact
297 $ hg rm fenugreek
297 $ hg rm fenugreek
298 $ hg debugwalk fenugreek
298 $ hg debugwalk fenugreek
299 f fenugreek fenugreek exact
299 f fenugreek fenugreek exact
300 $ touch new
300 $ touch new
301 $ hg debugwalk new
301 $ hg debugwalk new
302 f new new exact
302 f new new exact
303
303
304 $ mkdir ignored
304 $ mkdir ignored
305 $ touch ignored/file
305 $ touch ignored/file
306 $ echo '^ignored$' > .hgignore
306 $ echo '^ignored$' > .hgignore
307 $ hg debugwalk ignored
307 $ hg debugwalk ignored
308 $ hg debugwalk ignored/file
308 $ hg debugwalk ignored/file
309 f ignored/file ignored/file exact
309 f ignored/file ignored/file exact
310
310
311 Test listfile and listfile0
311 Test listfile and listfile0
312
312
313 $ python -c "file('listfile0', 'wb').write('fenugreek\0new\0')"
313 $ python -c "file('listfile0', 'wb').write('fenugreek\0new\0')"
314 $ hg debugwalk -I 'listfile0:listfile0'
314 $ hg debugwalk -I 'listfile0:listfile0'
315 f fenugreek fenugreek
315 f fenugreek fenugreek
316 f new new
316 f new new
317 $ python -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
317 $ python -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
318 $ hg debugwalk -I 'listfile:listfile'
318 $ hg debugwalk -I 'listfile:listfile'
319 f fenugreek fenugreek
319 f fenugreek fenugreek
320 f mammals/skunk mammals/skunk
320 f mammals/skunk mammals/skunk
321 f new new
321 f new new
322
322
323 $ cd ..
323 $ cd ..
324 $ hg debugwalk -R t t/mammals/skunk
324 $ hg debugwalk -R t t/mammals/skunk
325 f mammals/skunk t/mammals/skunk exact
325 f mammals/skunk t/mammals/skunk exact
326 $ mkdir t2
326 $ mkdir t2
327 $ cd t2
327 $ cd t2
328 $ hg debugwalk -R ../t ../t/mammals/skunk
328 $ hg debugwalk -R ../t ../t/mammals/skunk
329 f mammals/skunk ../t/mammals/skunk exact
329 f mammals/skunk ../t/mammals/skunk exact
330 $ hg debugwalk --cwd ../t mammals/skunk
330 $ hg debugwalk --cwd ../t mammals/skunk
331 f mammals/skunk mammals/skunk exact
331 f mammals/skunk mammals/skunk exact
332
332
333 $ cd ..
333 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now