tests/test-http.t
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 01 Jun 2015 20:23:22 -0700
changeset 25401 d29201352af7
parent 25378 98b5676323db
child 25405 220a220ed088
permissions -rw-r--r--
bundle2: part handler for processing .hgtags fnodes mappings .hgtags fnodes cache entries can be expensive to compute, especially if there are hundreds of even thousands of them. This patch implements support for receiving a bundle2 part that contains a mapping of changeset to .hgtags fnodes. An upcoming patch will teach the server to send this part, allowing clients to bypass having to redundantly compute these values. A number of tests changed due to the client advertising the "hgtagsfnodes" capability.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 22019
diff changeset
     1
#require serve
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     2
25378
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
     3
  $ cat << EOF >> $HGRCPATH
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
     4
  > [experimental]
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
     5
  > # drop me once bundle2 is the default,
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
     6
  > # added to get test change early.
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
     7
  > bundle2-exp = True
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
     8
  > EOF
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
     9
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    10
  $ hg init test
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    11
  $ cd test
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    12
  $ echo foo>foo
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    13
  $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    14
  $ echo foo>foo.d/foo
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    15
  $ echo bar>foo.d/bAr.hg.d/BaR
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    16
  $ echo bar>foo.d/baR.d.hg/bAR
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    17
  $ hg commit -A -m 1
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    18
  adding foo
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    19
  adding foo.d/bAr.hg.d/BaR
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    20
  adding foo.d/baR.d.hg/bAR
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    21
  adding foo.d/foo
13445
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
    22
  $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    23
  $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    24
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    25
Test server address cannot be reused
4289
e17598881509 test-http: use printenv.py
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4130
diff changeset
    26
17023
3e2d8120528b test-http and test-https: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
    27
#if windows
3e2d8120528b test-http and test-https: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
    28
  $ hg serve -p $HGPORT1 2>&1
3e2d8120528b test-http and test-https: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
    29
  abort: cannot start server at ':$HGPORT1': * (glob)
3e2d8120528b test-http and test-https: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
    30
  [255]
3e2d8120528b test-http and test-https: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
    31
#else
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    32
  $ hg serve -p $HGPORT1 2>&1
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12446
diff changeset
    33
  abort: cannot start server at ':$HGPORT1': Address already in use
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    34
  [255]
17023
3e2d8120528b test-http and test-https: partially adapt for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents: 17018
diff changeset
    35
#endif
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    36
  $ cd ..
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    37
  $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    38
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    39
clone via stream
9506
49b62395e910 streamclone: partially encode filename over the wire, not for local read (issue1847)
Greg Ward <greg-hg@gerg.ca>
parents: 8167
diff changeset
    40
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    41
  $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    42
  streaming all changes
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    43
  6 files to transfer, 606 bytes of data
14023
2cd1520664b8 tests: check for (*/sec) instead of (*B/sec) to match (X bytes/sec)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 13445
diff changeset
    44
  transferred * bytes in * seconds (*/sec) (glob)
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
    45
  searching for changes
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
    46
  no changes found
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    47
  updating to branch default
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    48
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    49
  $ hg verify -R copy
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    50
  checking changesets
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    51
  checking manifests
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    52
  crosschecking files in changesets and manifests
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    53
  checking files
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    54
  4 files, 1 changesets, 4 total revisions
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    55
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    56
try to clone via stream, should use pull instead
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    57
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    58
  $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    59
  requesting all changes
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    60
  adding changesets
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    61
  adding manifests
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    62
  adding file changes
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    63
  added 1 changesets with 4 changes to 4 files
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    64
  updating to branch default
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    65
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
2612
ffb895f16925 add support for streaming clone.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    66
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    67
clone via pull
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    68
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    69
  $ hg clone http://localhost:$HGPORT1/ copy-pull
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    70
  requesting all changes
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    71
  adding changesets
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    72
  adding manifests
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    73
  adding file changes
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    74
  added 1 changesets with 4 changes to 4 files
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    75
  updating to branch default
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    76
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    77
  $ hg verify -R copy-pull
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    78
  checking changesets
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    79
  checking manifests
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    80
  crosschecking files in changesets and manifests
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    81
  checking files
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    82
  4 files, 1 changesets, 4 total revisions
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    83
  $ cd test
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    84
  $ echo bar > bar
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    85
  $ hg commit -A -d '1 0' -m 2
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    86
  adding bar
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
    87
  $ cd ..
2673
109a22f5434a hooks: add url to changegroup, incoming, prechangegroup, pretxnchangegroup hooks
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2622
diff changeset
    88
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    89
clone over http with --update
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    90
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    91
  $ hg clone http://localhost:$HGPORT1/ updated --update 0
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    92
  requesting all changes
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    93
  adding changesets
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    94
  adding manifests
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    95
  adding file changes
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    96
  added 2 changesets with 5 changes to 5 files
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    97
  updating to branch default
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    98
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
    99
  $ hg log -r . -R updated
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   100
  changeset:   0:8b6053c928fe
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   101
  user:        test
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   102
  date:        Thu Jan 01 00:00:00 1970 +0000
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   103
  summary:     1
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   104
  
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   105
  $ rm -rf updated
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   106
14161
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   107
incoming via HTTP
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   108
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   109
  $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   110
  adding changesets
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   111
  adding manifests
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   112
  adding file changes
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   113
  added 1 changesets with 4 changes to 4 files
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   114
  updating to branch default
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   115
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   116
  $ cd partial
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   117
  $ touch LOCAL
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   118
  $ hg ci -qAm LOCAL
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   119
  $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   120
  comparing with http://localhost:$HGPORT1/
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   121
  searching for changes
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   122
  2
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   123
  $ cd ..
8a0fca925992 bundlerepo: fix and improve getremotechanges
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents: 14023
diff changeset
   124
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   125
pull
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   126
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   127
  $ cd copy-pull
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   128
  $ 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
   129
  $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   130
  $ hg pull
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12446
diff changeset
   131
  pulling from http://localhost:$HGPORT1/
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   132
  searching for changes
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   133
  adding changesets
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   134
  adding manifests
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   135
  adding file changes
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   136
  added 1 changesets with 1 changes to 1 files
24740
d283517b260b transaction: introduce a transaction ID, to be available to all hooks
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23546
diff changeset
   137
  changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:* HG_URL=http://localhost:$HGPORT1/ (glob)
12446
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   138
  (run 'hg update' to get a working copy)
df57227a72bf tests: unify test-http
Matt Mackall <mpm@selenic.com>
parents: 10414
diff changeset
   139
  $ cd ..
13445
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   140
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   141
clone from invalid URL
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   142
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   143
  $ hg clone http://localhost:$HGPORT/bad
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   144
  abort: HTTP Error 404: Not Found
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   145
  [255]
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   146
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   147
test http authentication
16361
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   148
+ use the same server to test server side streaming preference
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   149
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   150
  $ cd test
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   151
  $ cat << EOT > userpass.py
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   152
  > import base64
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   153
  > from mercurial.hgweb import common
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   154
  > def perform_authentication(hgweb, req, op):
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   155
  >     auth = req.env.get('HTTP_AUTHORIZATION')
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   156
  >     if not auth:
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   157
  >         raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   158
  >                 [('WWW-Authenticate', 'Basic Realm="mercurial"')])
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   159
  >     if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   160
  >         raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   161
  > def extsetup():
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   162
  >     common.permhooks.insert(0, perform_authentication)
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   163
  > EOT
16361
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   164
  $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \
20385
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   165
  >    --config server.preferuncompressed=True \
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   166
  >    --config web.push_ssl=False --config web.allow_push=* -A ../access.log
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   167
  $ cat pid >> $DAEMON_PIDS
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   168
20291
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   169
  $ cat << EOF > get_pass.py
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   170
  > import getpass
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   171
  > def newgetpass(arg):
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   172
  >   return "pass"
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   173
  > getpass.getpass = newgetpass
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   174
  > EOF
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   175
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   176
  $ hg id http://localhost:$HGPORT2/
20291
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   177
  abort: http authorization required for http://localhost:$HGPORT2/
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   178
  [255]
20291
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   179
  $ hg id http://localhost:$HGPORT2/
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   180
  abort: http authorization required for http://localhost:$HGPORT2/
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   181
  [255]
20291
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   182
  $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   183
  http authorization required for http://localhost:$HGPORT2/
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   184
  realm: mercurial
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   185
  user: user
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   186
  password: 5fed3813f7f5
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   187
  $ hg id http://user:pass@localhost:$HGPORT2/
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   188
  5fed3813f7f5
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   189
  $ echo '[auth]' >> .hg/hgrc
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   190
  $ echo 'l.schemes=http' >> .hg/hgrc
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   191
  $ echo 'l.prefix=lo' >> .hg/hgrc
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   192
  $ echo 'l.username=user' >> .hg/hgrc
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   193
  $ echo 'l.password=pass' >> .hg/hgrc
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   194
  $ hg id http://localhost:$HGPORT2/
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   195
  5fed3813f7f5
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   196
  $ hg id http://localhost:$HGPORT2/
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   197
  5fed3813f7f5
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   198
  $ hg id http://user@localhost:$HGPORT2/
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   199
  5fed3813f7f5
16361
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   200
  $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   201
  streaming all changes
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   202
  7 files to transfer, 916 bytes of data
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   203
  transferred * bytes in * seconds (*/sec) (glob)
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
   204
  searching for changes
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
   205
  no changes found
16361
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   206
  updating to branch default
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   207
  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
23546
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   208
--pull should override server's preferuncompressed
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   209
  $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   210
  requesting all changes
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   211
  adding changesets
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   212
  adding manifests
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   213
  adding file changes
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   214
  added 2 changesets with 5 changes to 5 files
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   215
  updating to branch default
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   216
  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
16361
6097ede2be4d protocol: Add the stream-preferred capability
Benoit Allard <benoit@aeteurope.nl>
parents: 15446
diff changeset
   217
17342
471f30d360ea clone: don't fail with --update for non-local clones (issue3578)
Augie Fackler <raf@durin42.com>
parents: 17260
diff changeset
   218
  $ hg id http://user2@localhost:$HGPORT2/
20291
7d589d923b8a url: added authuri when login information is requested (issue3209)
Lucas Moscovicz <lmoscovicz@fb.com>
parents: 17342
diff changeset
   219
  abort: http authorization required for http://localhost:$HGPORT2/
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   220
  [255]
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   221
  $ hg id http://user:pass2@localhost:$HGPORT2/
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   222
  abort: HTTP Error 403: no
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   223
  [255]
20385
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   224
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   225
  $ hg -R dest tag -r tip top
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   226
  $ hg -R dest push http://user:pass@localhost:$HGPORT2/
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   227
  pushing to http://user:***@localhost:$HGPORT2/
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   228
  searching for changes
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   229
  remote: adding changesets
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   230
  remote: adding manifests
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   231
  remote: adding file changes
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   232
  remote: added 1 changesets with 1 changes to 1 files
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   233
  $ hg rollback -q
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   234
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   235
  $ cut -c38- ../access.log
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   236
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   237
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   238
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   239
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   240
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   241
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   242
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   243
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   244
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   245
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   246
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   247
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   248
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   249
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   250
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   251
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   252
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   253
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   254
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   255
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   256
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   257
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   258
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   259
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   260
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   261
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   262
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   263
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   264
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   265
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   266
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   267
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   268
  "GET /?cmd=branchmap HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   269
  "GET /?cmd=stream_out HTTP/1.1" 401 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   270
  "GET /?cmd=stream_out HTTP/1.1" 200 -
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
   271
  "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d
25401
d29201352af7 bundle2: part handler for processing .hgtags fnodes mappings
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25378
diff changeset
   272
  "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks
23116
2dc6b7917cdf clone: fix copying bookmarks in uncompressed clones (issue4430)
Durham Goode <durham@fb.com>
parents: 22960
diff changeset
   273
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
20385
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   274
  "GET /?cmd=capabilities HTTP/1.1" 200 -
23546
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   275
  "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D
25401
d29201352af7 bundle2: part handler for processing .hgtags fnodes mappings
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25378
diff changeset
   276
  "GET /?cmd=getbundle HTTP/1.1" 401 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks
d29201352af7 bundle2: part handler for processing .hgtags fnodes mappings
Gregory Szorc <gregory.szorc@gmail.com>
parents: 25378
diff changeset
   277
  "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=phase%2Cbookmarks
23546
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   278
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
deabbe7ed54b localrepo.clone: add a way to override server preferuncompressed
Siddharth Agarwal <sid0@fb.com>
parents: 23116
diff changeset
   279
  "GET /?cmd=capabilities HTTP/1.1" 200 -
20385
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   280
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   281
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   282
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   283
  "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   284
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   285
  "GET /?cmd=listkeys HTTP/1.1" 403 - x-hgarg-1:namespace=namespaces
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   286
  "GET /?cmd=capabilities HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   287
  "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872
22019
9fcf772f15ff push: perform phases discovery before the push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20966
diff changeset
   288
  "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=phases
9fcf772f15ff push: perform phases discovery before the push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 20966
diff changeset
   289
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
22239
0688010ee38f push: move bookmark discovery with other discovery steps
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22046
diff changeset
   290
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
20385
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   291
  "GET /?cmd=branchmap HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   292
  "GET /?cmd=branchmap HTTP/1.1" 200 -
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   293
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks
25378
98b5676323db test: use bundle2 in test-http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25106
diff changeset
   294
  "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365
20385
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   295
  "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases
54235a6ff98a tests: improved test coverage for HTTP authentication and 401 responses
Mads Kiilerich <madski@unity3d.com>
parents: 20384
diff changeset
   296
15026
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   297
  $ cd ..
f32a2989ff58 test-http: test http authentication
Mads Kiilerich <mads@kiilerich.com>
parents: 14161
diff changeset
   298
15055
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   299
clone of serve with repo in root and unserved subrepo (issue2970)
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   300
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   301
  $ hg --cwd test init sub
17260
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17023
diff changeset
   302
  $ echo empty > test/sub/empty
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17023
diff changeset
   303
  $ hg --cwd test/sub add empty
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17023
diff changeset
   304
  $ hg --cwd test/sub commit -qm 'add empty'
e432fb4b4221 tag: don't allow tagging the null revision (issue1915)
Brad Hall <bhall@fb.com>
parents: 17023
diff changeset
   305
  $ hg --cwd test/sub tag -r 0 something
15055
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   306
  $ echo sub = sub > test/.hgsub
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   307
  $ hg --cwd test add .hgsub
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   308
  $ hg --cwd test commit -qm 'add subrepo'
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   309
  $ hg clone http://localhost:$HGPORT noslash-clone
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   310
  requesting all changes
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   311
  adding changesets
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   312
  adding manifests
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   313
  adding file changes
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   314
  added 3 changesets with 7 changes to 7 files
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   315
  updating to branch default
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   316
  abort: HTTP Error 404: Not Found
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   317
  [255]
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   318
  $ hg clone http://localhost:$HGPORT/ slash-clone
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   319
  requesting all changes
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   320
  adding changesets
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   321
  adding manifests
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   322
  adding file changes
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   323
  added 3 changesets with 7 changes to 7 files
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   324
  updating to branch default
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   325
  abort: HTTP Error 404: Not Found
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   326
  [255]
d629f1e89021 subrepo: fix cloning of repos from urls without slash after host (issue2970)
Mads Kiilerich <mads@kiilerich.com>
parents: 15026
diff changeset
   327
13445
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   328
check error log
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   329
61a898576888 hgweb: handle invalid requests with both form data and querystring
Mads Kiilerich <mads@kiilerich.com>
parents: 13439
diff changeset
   330
  $ cat error.log