tests/test-static-http.t
author Lucas Moscovicz <lmoscovicz@fb.com>
Mon, 24 Feb 2014 16:36:17 -0800
changeset 20703 e07b1fd30805
parent 17538 31ca918d539a
child 22046 7a9cbb315d84
permissions -rw-r--r--
revset: added sort methods to generatorsets Method needed to propagate sort calls amongst lazy structures. The generated list (stored in the object) is sorted. If the generated list did not contain all elements from the generator, we take care of that before sorting the list.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17538
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
     1
  $ "$TESTDIR/hghave" killdaemons || exit 80
1111
addcb77fe500 Add an old-http test case
mpm@selenic.com
parents:
diff changeset
     2
17020
e0d9a3bfe406 test-static-http: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
     3
#if windows
e0d9a3bfe406 test-static-http: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
     4
  $ hg clone http://localhost:$HGPORT/ copy
e0d9a3bfe406 test-static-http: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
     5
  abort: * (glob)
e0d9a3bfe406 test-static-http: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
     6
  [255]
e0d9a3bfe406 test-static-http: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
     7
#else
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     8
  $ hg clone http://localhost:$HGPORT/ copy
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
     9
  abort: error: Connection refused
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    10
  [255]
17020
e0d9a3bfe406 test-static-http: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
    11
#endif
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    12
  $ test -d copy
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    13
  [1]
1111
addcb77fe500 Add an old-http test case
mpm@selenic.com
parents:
diff changeset
    14
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    15
This server doesn't do range requests so it's basically only good for
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    16
one pull
1111
addcb77fe500 Add an old-http test case
mpm@selenic.com
parents:
diff changeset
    17
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    18
  $ cat > dumb.py <<EOF
13208
b6693876c250 test-static-http.t: get kill actually working
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    19
  > import BaseHTTPServer, SimpleHTTPServer, os, signal, sys
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    20
  > 
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    21
  > def run(server_class=BaseHTTPServer.HTTPServer,
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    22
  >         handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    23
  >     server_address = ('localhost', int(os.environ['HGPORT']))
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    24
  >     httpd = server_class(server_address, handler_class)
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    25
  >     httpd.serve_forever()
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    26
  > 
13208
b6693876c250 test-static-http.t: get kill actually working
Adrian Buehlmann <adrian@cadifra.com>
parents: 12847
diff changeset
    27
  > signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0))
17538
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    28
  > fp = file('dumb.pid', 'wb')
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    29
  > fp.write(str(os.getpid()) + '\n')
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    30
  > fp.close()
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    31
  > run()
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    32
  > EOF
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    33
  $ python dumb.py 2>/dev/null &
17538
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    34
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    35
Cannot just read $!, it will not be set to the right value on Windows/MinGW
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    36
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    37
  $ cat > wait.py <<EOF
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    38
  > import time
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    39
  > while True:
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    40
  >     try:
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    41
  >         if '\n' in file('dumb.pid', 'rb').read():
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    42
  >             break
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    43
  >     except IOError:
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    44
  >         pass
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    45
  >     time.sleep(0.2)
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    46
  > EOF
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    47
  $ python wait.py
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
    48
  $ cat dumb.pid >> $DAEMON_PIDS
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 13440
diff changeset
    49
  $ hg init remote
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    50
  $ cd remote
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    51
  $ echo foo > bar
13209
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    52
  $ echo c2 > '.dotfile with spaces'
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    53
  $ hg add
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    54
  adding .dotfile with spaces
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    55
  adding bar
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    56
  $ hg commit -m"test"
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    57
  $ hg tip
13209
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    58
  changeset:   0:02770d679fb8
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    59
  tag:         tip
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    60
  user:        test
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    61
  date:        Thu Jan 01 00:00:00 1970 +0000
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    62
  summary:     test
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    63
  
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    64
  $ cd ..
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    65
  $ hg clone static-http://localhost:$HGPORT/remote local
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    66
  requesting all changes
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    67
  adding changesets
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    68
  adding manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    69
  adding file changes
13209
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    70
  added 1 changesets with 2 changes to 2 files
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    71
  updating to branch default
13209
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    72
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    73
  $ cd local
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    74
  $ hg verify
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    75
  checking changesets
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    76
  checking manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    77
  crosschecking files in changesets and manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    78
  checking files
13209
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
    79
  2 files, 1 changesets, 2 total revisions
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    80
  $ cat bar
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    81
  foo
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    82
  $ cd ../remote
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    83
  $ echo baz > quux
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    84
  $ hg commit -A -mtest2
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    85
  adding quux
1111
addcb77fe500 Add an old-http test case
mpm@selenic.com
parents:
diff changeset
    86
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    87
check for HTTP opener failures when cachefile does not exist
1111
addcb77fe500 Add an old-http test case
mpm@selenic.com
parents:
diff changeset
    88
13272
5ccdca7df211 move tags.cache and branchheads.cache to a collected cache folder .hg/cache/
jfh <jason@jasonfharris.com>
parents: 13209
diff changeset
    89
  $ rm .hg/cache/*
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    90
  $ cd ../local
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    91
  $ echo '[hooks]' >> .hg/hgrc
17018
e7fdfc702d9f tests: consistently use printenv.py the same MSYS/Windows-compatible way
Mads Kiilerich <mads@kiilerich.com>
parents: 16982
diff changeset
    92
  $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    93
  $ hg pull
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12491
diff changeset
    94
  pulling from static-http://localhost:$HGPORT/remote
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    95
  searching for changes
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    96
  adding changesets
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    97
  adding manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    98
  adding file changes
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    99
  added 1 changesets with 1 changes to 1 files
16982
9c892c830a72 tests/printenv.py: eliminate trailing spaces on output
Adrian Buehlmann <adrian@cadifra.com>
parents: 15446
diff changeset
   100
  changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   101
  (run 'hg update' to get a working copy)
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2572
diff changeset
   102
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   103
trying to push
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2572
diff changeset
   104
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   105
  $ hg update
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   106
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   107
  $ echo more foo >> bar
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   108
  $ hg commit -m"test"
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   109
  $ hg push
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12491
diff changeset
   110
  pushing to static-http://localhost:$HGPORT/remote
17193
1d710fe5ee0e peer: introduce canpush and improve error message
Sune Foldager <cryo@cyanite.org>
parents: 17020
diff changeset
   111
  abort: destination does not support push
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   112
  [255]
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   113
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   114
trying clone -r
1111
addcb77fe500 Add an old-http test case
mpm@selenic.com
parents:
diff changeset
   115
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   116
  $ cd ..
17486
73e3e368bd42 spelling: doesn't/does not
timeless@mozdev.org
parents: 17260
diff changeset
   117
  $ hg clone -r doesnotexist static-http://localhost:$HGPORT/remote local0
73e3e368bd42 spelling: doesn't/does not
timeless@mozdev.org
parents: 17260
diff changeset
   118
  abort: unknown revision 'doesnotexist'!
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   119
  [255]
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   120
  $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   121
  adding changesets
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   122
  adding manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   123
  adding file changes
13209
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
   124
  added 1 changesets with 2 changes to 2 files
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   125
  updating to branch default
13209
501f979d26b6 test-static-http.t: increase test coverage on filenames
Adrian Buehlmann <adrian@cadifra.com>
parents: 13208
diff changeset
   126
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
7005
7739b61897df do not pretend to lock static-http repositories (issue994)
Martin Geisler <mg@daimi.au.dk>
parents: 6028
diff changeset
   127
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   128
test with "/" URI (issue 747) and subrepo
11066
26abd91d9e84 static-http: mimic more closely localrepo (issue2164: allow clone -r )
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 10398
diff changeset
   129
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   130
  $ hg init
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   131
  $ hg init sub
17260
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17193
diff changeset
   132
  $ touch sub/test
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17193
diff changeset
   133
  $ hg -R sub commit -A -m "test"
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17193
diff changeset
   134
  adding test
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   135
  $ hg -R sub tag not-empty
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   136
  $ echo sub=sub > .hgsub
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   137
  $ echo a > a
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   138
  $ hg add a .hgsub
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   139
  $ hg -q ci -ma
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   140
  $ hg clone static-http://localhost:$HGPORT/ local2
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   141
  requesting all changes
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   142
  adding changesets
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   143
  adding manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   144
  adding file changes
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   145
  added 1 changesets with 3 changes to 3 files
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   146
  updating to branch default
14281
ccb7240acf32 subrepo: create subrepos using clone instead of pull
Martin Geisler <mg@aragost.com>
parents: 13956
diff changeset
   147
  cloning subrepo sub from static-http://localhost:$HGPORT/sub
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   148
  requesting all changes
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   149
  adding changesets
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   150
  adding manifests
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   151
  adding file changes
17260
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17193
diff changeset
   152
  added 2 changesets with 2 changes to 2 files
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   153
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   154
  $ cd local2
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   155
  $ hg verify
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   156
  checking changesets
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   157
  checking manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   158
  crosschecking files in changesets and manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   159
  checking files
13440
286a3720d472 statichttprepo: don't modify localrepo class variables
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   160
  3 files, 1 changesets, 3 total revisions
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   161
  $ cat a
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   162
  a
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   163
  $ hg paths
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12491
diff changeset
   164
  default = static-http://localhost:$HGPORT/
5316
598dae804a5f Test static-http calls on '/' URI (issue 747)
Patrick Mezard <pmezard@gmail.com>
parents: 4290
diff changeset
   165
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   166
test with empty repo (issue965)
6028
6605a03cbf87 make static-http work with empty repos (issue965)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5384
diff changeset
   167
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   168
  $ cd ..
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   169
  $ hg init remotempty
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   170
  $ hg clone static-http://localhost:$HGPORT/remotempty local3
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   171
  no changes found
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   172
  updating to branch default
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   173
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   174
  $ cd local3
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   175
  $ hg verify
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   176
  checking changesets
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   177
  checking manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   178
  crosschecking files in changesets and manifests
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   179
  checking files
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   180
  0 files, 0 changesets, 0 total revisions
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   181
  $ hg paths
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12491
diff changeset
   182
  default = static-http://localhost:$HGPORT/remotempty
6028
6605a03cbf87 make static-http work with empty repos (issue965)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5384
diff changeset
   183
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   184
test with non-repo
6028
6605a03cbf87 make static-http work with empty repos (issue965)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5384
diff changeset
   185
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   186
  $ cd ..
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   187
  $ mkdir notarepo
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   188
  $ hg clone static-http://localhost:$HGPORT/notarepo local3
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12491
diff changeset
   189
  abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
12491
f0c5c334ded1 tests: unify test-static-http
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
   190
  [255]
17538
31ca918d539a test-static-http.t: enable on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17486
diff changeset
   191
  $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS