annotate tests/test-http @ 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 1a8df80dfdde
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
1 #!/bin/sh
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
2
4289
e17598881509 test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4130
diff changeset
3 cp "$TESTDIR"/printenv.py .
e17598881509 test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4130
diff changeset
4
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
5 hg init test
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
6 cd test
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
7 echo foo>foo
9506
49b62395e910 streamclone: partially encode filename over the wire, not for local read (issue1847)
Greg Ward <greg-hg@gerg.ca>
parents: 8167
diff changeset
8 mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
49b62395e910 streamclone: partially encode filename over the wire, not for local read (issue1847)
Greg Ward <greg-hg@gerg.ca>
parents: 8167
diff changeset
9 echo foo>foo.d/foo
49b62395e910 streamclone: partially encode filename over the wire, not for local read (issue1847)
Greg Ward <greg-hg@gerg.ca>
parents: 8167
diff changeset
10 echo bar>foo.d/bAr.hg.d/BaR
49b62395e910 streamclone: partially encode filename over the wire, not for local read (issue1847)
Greg Ward <greg-hg@gerg.ca>
parents: 8167
diff changeset
11 echo bar>foo.d/baR.d.hg/bAR
49b62395e910 streamclone: partially encode filename over the wire, not for local read (issue1847)
Greg Ward <greg-hg@gerg.ca>
parents: 8167
diff changeset
12
8167
6c82beaaa11a tests: removed redundant "-d '0 0'" from test scripts
Martin Geisler <mg@lazybytes.net>
parents: 6263
diff changeset
13 hg commit -A -m 1
10414
1a8df80dfdde streaming: actually change default
Matt Mackall <mpm@selenic.com>
parents: 10398
diff changeset
14 hg serve -p $HGPORT -d --pid-file=../hg1.pid
1a8df80dfdde streaming: actually change default
Matt Mackall <mpm@selenic.com>
parents: 10398
diff changeset
15 hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
4130
178007785be8 web/server: disable address reuse option for BaseHTTPServer on windows
Patrick Mezard <pmezard@gmail.com>
parents: 3015
diff changeset
16 # Test server address cannot be reused
10398
ace3cf2bc991 tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents: 10154
diff changeset
17 hg serve -p $HGPORT1 2>&1 | sed -e "s/abort: cannot start server at ':$HGPORT1':.*/abort: cannot start server at ':\$HGPORT1':/"
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
18 cd ..
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
19 cat hg1.pid hg2.pid >> $DAEMON_PIDS
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
20
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
21 echo % clone via stream
10154
d4a62b6d4a58 run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 9506
diff changeset
22 hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1 | \
3015
fa4229c60dd7 Allow for MB/sec transfer rates in test-http-proxy and test-ssh.
Lee Cantey <lcantey@gmail.com>
parents: 2986
diff changeset
23 sed -e 's/[0-9][0-9.]*/XXX/g' -e 's/[KM]\(B\/sec\)/X\1/'
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
24 hg verify -R copy
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
25
2621
5a5852a417b1 clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2613
diff changeset
26 echo % try to clone via stream, should use pull instead
10154
d4a62b6d4a58 run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 9506
diff changeset
27 hg clone --uncompressed http://localhost:$HGPORT1/ copy2
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
28
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
29 echo % clone via pull
10154
d4a62b6d4a58 run-tests.py: clears http_proxy for all tests
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 9506
diff changeset
30 hg clone http://localhost:$HGPORT1/ copy-pull
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
31 hg verify -R copy-pull
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
32
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
33 cd test
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
34 echo bar > bar
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
35 hg commit -A -d '1 0' -m 2
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
36 cd ..
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
37
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
38 echo % pull
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
39 cd copy-pull
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
40 echo '[hooks]' >> .hg/hgrc
4289
e17598881509 test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4130
diff changeset
41 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
10398
ace3cf2bc991 tests: don't just silently strip port numbers
Mads Kiilerich <mads@kiilerich.com>
parents: 10154
diff changeset
42 hg pull | sed -e "s,:$HGPORT1/,:\$HGPORT1/,"
2676
7c81e337fed2 Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2673
diff changeset
43 cd ..