Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-http @ 5192:33015dac5df5
convert: fix mercurial_sink.putcommit
Changeset 4ebc8693ce72 added some code to putcommit to avoid creating a
revision that touches no files, but this can break regular conversions
from some repositories:
- conceptually, since we're converting a repo, we should try to make
the new hg repo as similar as possible to the original repo - we
should create a new changeset, even if the original revision didn't
touch any files (maybe the commit message had some important bit);
- even if a "regular" revision that doesn't touch any file may seem
weird (and maybe even broken), it's completely legitimate for a merge
revision to not touch any file, and, if we just skip it, the
converted repo will end up with wrong history and possibly an extra
head.
As an example, say the crew and main hg repos are sync'ed. Somebody
sends an important patch to the mailing list. Matt quickly applies
and pushes it. But at the same time somebody also applies it to crew
and pushes it. Suppose the commit message ended up being a bit
different (say, there was a typo and somebody didn't fix it) or that
the date ended up being different (because of different patch-applying
scripts): the changeset hashes will be different, but the manifests
will be the same.
Since both changesets were pushed to public repos, it's hard to recall
them. If both are merged, the manifest from the resulting merge
revision will have the exact same contents as its parents - i.e. the
merge revision really doesn't touch any file at all.
To keep the file filtering stuff "working", the generic code was changed
to skip empty revisions if we're filtering the repo, fixing a bug in the
process (we want parents[0] instead of tip).
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 17 Aug 2007 20:18:05 -0300 |
parents | e17598881509 |
children | e3a0c092b4e2 |
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 |
2621
5a5852a417b1
clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2613
diff
changeset
|
8 hg commit -A -d '0 0' -m 1 |
2676
7c81e337fed2
Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2673
diff
changeset
|
9 hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid |
7c81e337fed2
Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2673
diff
changeset
|
10 hg serve -p 20060 -d --pid-file=../hg2.pid |
4130
178007785be8
web/server: disable address reuse option for BaseHTTPServer on windows
Patrick Mezard <pmezard@gmail.com>
parents:
3012
diff
changeset
|
11 # Test server address cannot be reused |
178007785be8
web/server: disable address reuse option for BaseHTTPServer on windows
Patrick Mezard <pmezard@gmail.com>
parents:
3012
diff
changeset
|
12 hg serve -p 20060 2>&1 | sed -e 's/abort: cannot start server:.*/abort: cannot start server:/' |
2612
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
13 cd .. |
2676
7c81e337fed2
Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2673
diff
changeset
|
14 cat hg1.pid hg2.pid >> $DAEMON_PIDS |
2612
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
16 echo % clone via stream |
2621
5a5852a417b1
clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2613
diff
changeset
|
17 http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \ |
3012
fa4229c60dd7
Allow for MB/sec transfer rates in test-http-proxy and test-ssh.
Lee Cantey <lcantey@gmail.com>
parents:
2969
diff
changeset
|
18 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
|
19 hg verify -R copy |
2612
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
20 |
2621
5a5852a417b1
clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2613
diff
changeset
|
21 echo % try to clone via stream, should use pull instead |
5a5852a417b1
clone: disable stream support on server side by default.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2613
diff
changeset
|
22 http_proxy= hg clone --uncompressed http://localhost:20060/ copy2 |
2612
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
23 |
ffb895f16925
add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
24 echo % clone via pull |
2613
479e26afa10f
clone: do not make streaming default. add --stream option instead.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2612
diff
changeset
|
25 http_proxy= hg clone http://localhost:20059/ copy-pull |
2676
7c81e337fed2
Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2673
diff
changeset
|
26 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
|
27 |
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2622
diff
changeset
|
28 cd test |
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2622
diff
changeset
|
29 echo bar > bar |
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2622
diff
changeset
|
30 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
|
31 cd .. |
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 echo % pull |
2676
7c81e337fed2
Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2673
diff
changeset
|
34 cd copy-pull |
2673
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2622
diff
changeset
|
35 echo '[hooks]' >> .hg/hgrc |
4289
e17598881509
test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
4130
diff
changeset
|
36 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc |
2673
109a22f5434a
hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2622
diff
changeset
|
37 hg pull |
2676
7c81e337fed2
Fixed confused directory changing in test-http.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2673
diff
changeset
|
38 cd .. |