tests/test-bad-pull.t
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
Sat, 30 Apr 2011 17:21:37 +0200
changeset 14073 72c84f24b420
parent 12376 97ffc68f71d3
child 15446 c5c9ca3719f9
permissions -rw-r--r--
discovery: drop findoutgoing and simplify findcommonincoming's api This is a long desired cleanup and paves the way for new discovery. To specify subsets for bundling changes, all code should use the heads of the desired subset ("heads") and the heads of the common subset ("common") to be excluded from the bundled set. These can be used revlog.findmissing instead of revlog.nodesbetween. This fixes an actual bug exposed by the change in test-bundle-r.t where we try to bundle a changeset while specifying that said changeset is to be assumed already present in the target. This used to still bundle the changeset. It no longer does. This is similar to the bugs fixed by the recent switch to heads/common for incoming/pull.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11859
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
     1
  $ hg clone http://localhost:$HGPORT/ copy
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
     2
  abort: error: Connection refused
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11859
diff changeset
     3
  [255]
395
fbe8834923c5 commands: report http exceptions nicely
mpm@selenic.com
parents:
diff changeset
     4
11859
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
     5
  $ test -d copy || echo copy: No such file or directory
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
     6
  copy: No such file or directory
395
fbe8834923c5 commands: report http exceptions nicely
mpm@selenic.com
parents:
diff changeset
     7
11859
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
     8
  $ cat > dumb.py <<EOF
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
     9
  > import BaseHTTPServer, SimpleHTTPServer, os, signal
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    10
  > def run(server_class=BaseHTTPServer.HTTPServer,
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    11
  >         handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    12
  >     server_address = ('localhost', int(os.environ['HGPORT']))
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    13
  >     httpd = server_class(server_address, handler_class)
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    14
  >     httpd.serve_forever()
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    15
  > signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    16
  > run()
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    17
  > EOF
395
fbe8834923c5 commands: report http exceptions nicely
mpm@selenic.com
parents:
diff changeset
    18
11859
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    19
  $ python dumb.py 2>/dev/null &
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    20
  $ echo $! >> $DAEMON_PIDS
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    21
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    22
give the server some time to start running
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    23
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    24
  $ sleep 1
4317
66249be9aa23 test-bad-pull: try to avoid timing-related failures
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3469
diff changeset
    25
11859
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    26
  $ hg clone http://localhost:$HGPORT/foo copy2 2>&1
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
    27
  abort: HTTP Error 404: * (glob)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11859
diff changeset
    28
  [255]
395
fbe8834923c5 commands: report http exceptions nicely
mpm@selenic.com
parents:
diff changeset
    29
11859
f48178034569 tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents: 10154
diff changeset
    30
  $ kill $!