Mercurial > hg-stable
annotate tests/test-push-http-bundle1.t @ 35121:66c5a8cf2868
lfs: import the Facebook git-lfs client extension
The purpose of this is the same as the built-in largefiles extension- to handle
huge files outside of the normal storage system, generally to keep the amount of
data cloned to a lower amount. There are several benefits of implementing the
git-lfs protocol, instead of using the largefiles extension:
- Bitbucket and Github support (and probably wider support in 3rd party
hosting sites in general). [1][2]
- The number of hg internals monkey patched are several orders of magnitude
lower, so it will be easier to reason about and maintain. Future commands
will likely just work, without requiring various wrappers.
- The "standin" files are only written to the filelog, not the disk. That
should avoid weird edge cases where the largefile and standin files get out
of sync. [3] It also avoids the occasional printing of the "hidden" standin
file in various messages.
- Filesets like size() will work, even if the file isn't present. (It always
says 41 bytes for largefiles, whether present or not.)
The only place that I see where largefiles comes out on top is that it works
with `hg serve` for simple sharing, without external infrastructure. Getting
lfs-test-server working was a hassle, and took awhile to figure out. Maybe we
can do something to make it work in the future.
Long term, I expect that this will be highly preferred over largefiles. But if
we are to recommend this to largefile users, there are some UI issues to
bikeshed. Until they are resolved, I've marked this experimental, and am not
putting a pointer to this in the largefiles help. The (non exhaustive) list of
issues I've seen so far are:
- It isn't sufficient to just enable the largefiles extension- you have to
explicitly add a file with --large before it will pay attention to the
configured sizes and patterns on future adds. The justification being that
once you use it, you're stuck with it. I've seen people confused by this,
and haven't liked it myself. But it's also saved me a few times. Should we
do something like have a specific enabling config setting that must be set
in the local repo config, so that enabling this extension in the user or
system hgrc doesn't silently start storing lfs files?
- The largefiles extension adds a repo requirement when the first largefile is
committed, so that the extension must always be enabled in the future. This
extension is not doing that, and since I only enabled it locally to avoid
infecting other repos, I got a cryptic error about missing flag processors
when I cloned. Is there no repo requirement due to shallow/narrow clone
considerations (or other future advanced things)?
- In the (small amount of) reading I've done about the git implementation, it
seems that the files and sizes are stored in a tracked .gitattributes file.
I think a tracked file for this would be extremely useful for consistency
across developers, but this kind of touches on the tracked hgrc file
proposal a few months back.
- The git client can specify file patterns, not just sizes.
- The largefiles extension has a cache directory in the local repo, but also a
system wide one. We should probably implement a system wide cache too, so
that multiple clones don't have to refetch the files from the server.
- Jun mentioned other missing features, like SSH authentication, gc, etc.
The code corresponds to c0492b73c7ef in hg-experimental. [4] The only tweaks
are to load the extension in the tests with 'lfs=' instead of
'lfs=$TESTDIR/../hgext3rd/lfs', change the import in the *.py test to hgext
(from hgext3rd), add the 'testedwith' declaration, and mark it experimental for
now. The infinite-push, p4fastimport, and remotefilelog tests were left behind.
The devel-warnings for unregistered config options are not corrected yet, nor
are the import check warnings.
[1] https://www.mercurial-scm.org/pipermail/mercurial/2017-November/050699.html
[2] https://bitbucket.org/site/master/issues/3843/largefiles-support-bb-3903
[3] https://bz.mercurial-scm.org/show_bug.cgi?id=5738
[4] https://bitbucket.org/facebook/hg-experimental
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 14 Nov 2017 00:06:23 -0500 |
parents | 07872262fe67 |
children | e978e0c13252 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20966
diff
changeset
|
1 #require killdaemons |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
2 |
25389
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
3 This test checks behavior related to bundle1 that changed or is likely |
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
4 to change with bundle2. Feel free to factor out any part of the test |
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
5 which does not need to exist to keep bundle1 working. |
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
6 |
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
7 $ cat << EOF >> $HGRCPATH |
29700
6e375ba01b04
tests: use 'legacy.exchange' option in various bundle1 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
27739
diff
changeset
|
8 > [devel] |
25389
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
9 > # This test is dedicated to interaction through old bundle |
29700
6e375ba01b04
tests: use 'legacy.exchange' option in various bundle1 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
27739
diff
changeset
|
10 > legacy.exchange = bundle1 |
25389
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
11 > EOF |
d6389553b6a1
test: copy test-push-http.t to testpush-http-bundle1.t
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
24740
diff
changeset
|
12 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
13 $ hg init test |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
14 $ cd test |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
15 $ echo a > a |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
16 $ hg ci -Ama |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
17 adding a |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
18 $ cd .. |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
19 $ hg clone test test2 |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
20 updating to branch default |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
22 $ cd test2 |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
23 $ echo a >> a |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
24 $ hg ci -mb |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
25 $ req() { |
12743
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
26 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
27 > cat hg.pid >> $DAEMON_PIDS |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
28 > hg --cwd ../test2 push http://localhost:$HGPORT/ |
17455
2212af23c9de
test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents:
17018
diff
changeset
|
29 > exitstatus=$? |
25474
8c14f87bd0ae
tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents:
25472
diff
changeset
|
30 > killdaemons.py |
12743
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
31 > echo % serve errors |
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12643
diff
changeset
|
32 > cat errors.log |
17455
2212af23c9de
test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents:
17018
diff
changeset
|
33 > return $exitstatus |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
34 > } |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
35 $ cd ../test |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
36 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
37 expect ssl error |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
38 |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
39 $ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12483
diff
changeset
|
40 pushing to http://localhost:$HGPORT/ |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
41 searching for changes |
17456
59a168019255
hgweb: respond 403 forbidden for ssl required error
Yuya Nishihara <yuya@tcha.org>
parents:
17455
diff
changeset
|
42 abort: HTTP Error 403: ssl required |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
43 % serve errors |
17456
59a168019255
hgweb: respond 403 forbidden for ssl required error
Yuya Nishihara <yuya@tcha.org>
parents:
17455
diff
changeset
|
44 [255] |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
45 |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
46 expect authorization error |
6167
f53b9a383476
tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5386
diff
changeset
|
47 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
48 $ echo '[web]' > .hg/hgrc |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
49 $ echo 'push_ssl = false' >> .hg/hgrc |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
50 $ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12483
diff
changeset
|
51 pushing to http://localhost:$HGPORT/ |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
52 searching for changes |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
53 abort: authorization failed |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
54 % serve errors |
17455
2212af23c9de
test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents:
17018
diff
changeset
|
55 [255] |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
56 |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
57 expect authorization error: must have authorized user |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
58 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
59 $ echo 'allow_push = unperson' >> .hg/hgrc |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
60 $ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12483
diff
changeset
|
61 pushing to http://localhost:$HGPORT/ |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
62 searching for changes |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
63 abort: authorization failed |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
64 % serve errors |
17455
2212af23c9de
test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents:
17018
diff
changeset
|
65 [255] |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
66 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
67 expect success |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
68 |
30234
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
69 $ cat >> .hg/hgrc <<EOF |
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
70 > allow_push = * |
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
71 > [hooks] |
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
72 > changegroup = sh -c "printenv.py changegroup 0" |
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
73 > pushkey = sh -c "printenv.py pushkey 0" |
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
74 > EOF |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
75 $ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12483
diff
changeset
|
76 pushing to http://localhost:$HGPORT/ |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
77 searching for changes |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
78 remote: adding changesets |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
79 remote: adding manifests |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
80 remote: adding file changes |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
81 remote: added 1 changesets with 1 changes to 1 files |
31814
07872262fe67
tests: fix missing (glob) annotations in test-push-http-bundle1.t
Augie Fackler <augie@google.com>
parents:
31752
diff
changeset
|
82 remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
83 % serve errors |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
84 $ hg rollback |
13446
1e497df514e2
rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents:
13405
diff
changeset
|
85 repository tip rolled back to revision 0 (undo serve) |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
86 |
14093
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
87 expect success, server lacks the httpheader capability |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
88 |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
89 $ CAP=httpheader |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
90 $ . "$TESTDIR/notcapable" |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
91 $ req |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
92 pushing to http://localhost:$HGPORT/ |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
93 searching for changes |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
94 remote: adding changesets |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
95 remote: adding manifests |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
96 remote: adding file changes |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
97 remote: added 1 changesets with 1 changes to 1 files |
31814
07872262fe67
tests: fix missing (glob) annotations in test-push-http-bundle1.t
Augie Fackler <augie@google.com>
parents:
31752
diff
changeset
|
98 remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
14093
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
99 % serve errors |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
100 $ hg rollback |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
101 repository tip rolled back to revision 0 (undo serve) |
ce99d887585f
httprepo: long arguments support (issue2126)
Steven Brown <StevenGBrown@gmail.com>
parents:
14011
diff
changeset
|
102 |
13946
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
103 expect success, server lacks the unbundlehash capability |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
104 |
14011
b69471bdb678
tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13946
diff
changeset
|
105 $ CAP=unbundlehash |
b69471bdb678
tests: add script to disable a selected wire protocol capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13946
diff
changeset
|
106 $ . "$TESTDIR/notcapable" |
13946
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
107 $ req |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
108 pushing to http://localhost:$HGPORT/ |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
109 searching for changes |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
110 remote: adding changesets |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
111 remote: adding manifests |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
112 remote: adding file changes |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
113 remote: added 1 changesets with 1 changes to 1 files |
31814
07872262fe67
tests: fix missing (glob) annotations in test-push-http-bundle1.t
Augie Fackler <augie@google.com>
parents:
31752
diff
changeset
|
114 remote: changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_NODE_LAST=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_TXNID=TXN:$ID$ HG_URL=remote:http:$LOCALIP: (glob) |
13946
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
115 % serve errors |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
116 $ hg rollback |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
117 repository tip rolled back to revision 0 (undo serve) |
3c2f9f611ef6
tests: new test cases for the unbundlehash capability
Steven Brown <StevenGBrown@gmail.com>
parents:
13449
diff
changeset
|
118 |
26272
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
119 expect success, pre-d1b16a746db6 server supports the unbundle capability, but |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
120 has no parameter |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
121 |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
122 $ cat <<EOF > notcapable-unbundleparam.py |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
123 > from mercurial import extensions, httppeer |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
124 > def capable(orig, self, name): |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
125 > if name == 'unbundle': |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
126 > return True |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
127 > return orig(self, name) |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
128 > def uisetup(ui): |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
129 > extensions.wrapfunction(httppeer.httppeer, 'capable', capable) |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
130 > EOF |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
131 $ cp $HGRCPATH $HGRCPATH.orig |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
132 $ cat <<EOF >> $HGRCPATH |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
133 > [extensions] |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
134 > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
135 > EOF |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
136 $ req |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
137 pushing to http://localhost:$HGPORT/ |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
138 searching for changes |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
139 remote: adding changesets |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
140 remote: adding manifests |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
141 remote: adding file changes |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
142 remote: added 1 changesets with 1 changes to 1 files |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
143 remote: changegroup hook: * (glob) |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
144 % serve errors |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
145 $ hg rollback |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
146 repository tip rolled back to revision 0 (undo serve) |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
147 $ mv $HGRCPATH.orig $HGRCPATH |
59c410db8c68
readbundle: fix typo of None compression
Yuya Nishihara <yuya@tcha.org>
parents:
25478
diff
changeset
|
148 |
17793
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
149 expect push success, phase change failure |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
150 |
17842
a029dac38942
test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17793
diff
changeset
|
151 $ cat > .hg/hgrc <<EOF |
a029dac38942
test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17793
diff
changeset
|
152 > [web] |
a029dac38942
test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17793
diff
changeset
|
153 > push_ssl = false |
a029dac38942
test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17793
diff
changeset
|
154 > allow_push = * |
a029dac38942
test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17793
diff
changeset
|
155 > [hooks] |
30234
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
156 > prepushkey = sh -c "printenv.py prepushkey 1" |
17842
a029dac38942
test-push-http: fix failing test on Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17793
diff
changeset
|
157 > EOF |
17793
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
158 $ req |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
159 pushing to http://localhost:$HGPORT/ |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
160 searching for changes |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
161 remote: adding changesets |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
162 remote: adding manifests |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
163 remote: adding file changes |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
164 remote: added 1 changesets with 1 changes to 1 files |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
165 % serve errors |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
166 |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
167 expect phase change success |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
168 |
30234
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
169 $ cat >> .hg/hgrc <<EOF |
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
170 > prepushkey = sh -c "printenv.py prepushkey 0" |
34a5f6c66bc5
tests: invoke printenv.py via sh -c for test portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
29700
diff
changeset
|
171 > EOF |
17793
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
172 $ req |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
173 pushing to http://localhost:$HGPORT/ |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
174 searching for changes |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
175 no changes found |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
176 % serve errors |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
177 [1] |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
178 $ hg rollback |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
179 repository tip rolled back to revision 0 (undo serve) |
8474be4412ca
wireproto: fix pushkey hook failure and output on remote http repo
Wagner Bruna <wbruna@softwareexpress.com.br>
parents:
17565
diff
changeset
|
180 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
181 expect authorization error: all users denied |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
182 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
183 $ echo '[web]' > .hg/hgrc |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
184 $ echo 'push_ssl = false' >> .hg/hgrc |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
185 $ echo 'deny_push = *' >> .hg/hgrc |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
186 $ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12483
diff
changeset
|
187 pushing to http://localhost:$HGPORT/ |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
188 searching for changes |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
189 abort: authorization failed |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
190 % serve errors |
17455
2212af23c9de
test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents:
17018
diff
changeset
|
191 [255] |
2481
5c65b4e51610
add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
192 |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
193 expect authorization error: some users denied, users must be authenticated |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
194 |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
195 $ echo 'deny_push = unperson' >> .hg/hgrc |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
196 $ req |
12643
d08bb64888bc
tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents:
12483
diff
changeset
|
197 pushing to http://localhost:$HGPORT/ |
12483
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
198 searching for changes |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
199 abort: authorization failed |
fecd4966f8d4
tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents:
11469
diff
changeset
|
200 % serve errors |
17455
2212af23c9de
test-push-http: include exit status of hg push
Yuya Nishihara <yuya@tcha.org>
parents:
17018
diff
changeset
|
201 [255] |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15933
diff
changeset
|
202 |
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
15933
diff
changeset
|
203 $ cd .. |