Mercurial > hg
annotate tests/test-clone-uncompressed.t @ 35666:2c6ebd0c850e
lfs: remove internal url in test
`test-lfs-test-server.t` refers to a FB internal domain and requires certain
implementation (ex. set error code to 404) at that endpoint. Without any
workaround, It should in theory error out like "Domain cannot be resolved".
I don't know how Matt Harbison ran the test.
This patch changes the test to only depend on `lfs-test-server`.
Unfortunately the logic has to be changed since `lfs-test-server` does not
set error code to 404 but just removes "download" from "actions".
Differential Revision: https://phab.mercurial-scm.org/D1849
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 10 Jan 2018 21:27:05 -0800 |
parents | eb586ed5d8ce |
children | de32acb24949 |
rev | line source |
---|---|
27897
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 #require serve |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
28389
9ab45fbe045e
bdiff: (pure) support array.array arrays (issue5130)
timeless <timeless@mozdev.org>
parents:
27897
diff
changeset
|
3 Initialize repository |
9ab45fbe045e
bdiff: (pure) support array.array arrays (issue5130)
timeless <timeless@mozdev.org>
parents:
27897
diff
changeset
|
4 the status call is to check for issue5130 |
9ab45fbe045e
bdiff: (pure) support array.array arrays (issue5130)
timeless <timeless@mozdev.org>
parents:
27897
diff
changeset
|
5 |
27897
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 $ hg init server |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 $ cd server |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 $ touch foo |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 $ hg -q commit -A -m initial |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 >>> for i in range(1024): |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 ... with open(str(i), 'wb') as fh: |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 ... fh.write(str(i)) |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 $ hg -q commit -A -m 'add a lot of files' |
28389
9ab45fbe045e
bdiff: (pure) support array.array arrays (issue5130)
timeless <timeless@mozdev.org>
parents:
27897
diff
changeset
|
14 $ hg st |
27897
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 $ hg serve -p $HGPORT -d --pid-file=hg.pid |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 $ cat hg.pid >> $DAEMON_PIDS |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 $ cd .. |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 Basic clone |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 |
34393
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
21 $ hg clone --stream -U http://localhost:$HGPORT clone1 |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
22 streaming all changes |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
23 1027 files to transfer, 96.3 KB of data |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
24 transferred 96.3 KB in * seconds (*/sec) (glob) |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
25 searching for changes |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
26 no changes found |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
27 |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
28 --uncompressed is an alias to --stream |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
29 |
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
30 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
27897
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 streaming all changes |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 1027 files to transfer, 96.3 KB of data |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 transferred 96.3 KB in * seconds (*/sec) (glob) |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 searching for changes |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 no changes found |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 Clone with background file closing enabled |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 |
34393
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
39 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding |
27897
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 using http://localhost:$HGPORT/ |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 sending capabilities command |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
42 sending branchmap command |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 streaming all changes |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 sending stream_out command |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 1027 files to transfer, 96.3 KB of data |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
46 starting 4 threads for background file closing |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
47 transferred 96.3 KB in * seconds (*/sec) (glob) |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
48 query 1; heads |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
49 sending batch command |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
50 searching for changes |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
51 all remote heads known locally |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 no changes found |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
53 sending getbundle command |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
54 bundle2-input-bundle: with-transaction |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
55 bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
34322
10e162bb9bf5
pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents:
32744
diff
changeset
|
56 bundle2-input-part: "phase-heads" supported |
10e162bb9bf5
pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents:
32744
diff
changeset
|
57 bundle2-input-part: total payload size 24 |
27897
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
58 bundle2-input-bundle: 1 parts total |
2fdbf22a1b63
streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
59 checking for updated bookmarks |
28517
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
60 |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
61 Cannot stream clone when there are secret changesets |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
62 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
63 $ hg -R server phase --force --secret -r tip |
34393
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
64 $ hg clone --stream -U http://localhost:$HGPORT secret-denied |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
65 warning: stream clone requested but server has them disabled |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
66 requesting all changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
67 adding changesets |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
68 adding manifests |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
69 adding file changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
70 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
34483
diff
changeset
|
71 new changesets 96ee1d7354c4 |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
72 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
73 $ killdaemons.py |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
74 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
75 Streaming of secrets can be overridden by server config |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
76 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
77 $ cd server |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34393
diff
changeset
|
78 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
79 $ cat hg.pid > $DAEMON_PIDS |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
80 $ cd .. |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
81 |
34393
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
82 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
83 streaming all changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
84 1027 files to transfer, 96.3 KB of data |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
85 transferred 96.3 KB in * seconds (*/sec) (glob) |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
86 searching for changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
87 no changes found |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
88 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
89 $ killdaemons.py |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
90 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
91 Verify interaction between preferuncompressed and secret presence |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
92 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
93 $ cd server |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34393
diff
changeset
|
94 $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
95 $ cat hg.pid > $DAEMON_PIDS |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
96 $ cd .. |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
97 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
98 $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
99 requesting all changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
100 adding changesets |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
101 adding manifests |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
102 adding file changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
103 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
34483
diff
changeset
|
104 new changesets 96ee1d7354c4 |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
105 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
106 $ killdaemons.py |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
107 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
108 Clone not allowed when full bundles disabled and can't serve secrets |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
109 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
110 $ cd server |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34393
diff
changeset
|
111 $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
112 $ cat hg.pid > $DAEMON_PIDS |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
113 $ cd .. |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
114 |
34393
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
115 $ hg clone --stream http://localhost:$HGPORT secret-full-disabled |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
116 warning: stream clone requested but server has them disabled |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
117 requesting all changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
118 remote: abort: server has pull-based clones disabled |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
119 abort: pull failed on remote |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
120 (remove --pull if specified or upgrade Mercurial) |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
121 [255] |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
122 |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
123 Local stream clone with secrets involved |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
124 (This is just a test over behavior: if you have access to the repo's files, |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
125 there is no security so it isn't important to prevent a clone here.) |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
126 |
34393
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
127 $ hg clone -U --stream server local-secret |
32744
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
128 warning: stream clone requested but server has them disabled |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
129 requesting all changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
130 adding changesets |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
131 adding manifests |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
132 adding file changes |
33b7283a3828
streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31252
diff
changeset
|
133 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
34483
diff
changeset
|
134 new changesets 96ee1d7354c4 |
28517
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
135 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
136 Stream clone while repo is changing: |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
137 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
138 $ mkdir changing |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
139 $ cd changing |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
140 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
141 extension for delaying the server process so we reliably can modify the repo |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
142 while cloning |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
143 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
144 $ cat > delayer.py <<EOF |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
145 > import time |
31252
e7a35f18d91f
vfs: use 'vfs' module directly in 'test-clone-uncompressed'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29064
diff
changeset
|
146 > from mercurial import extensions, vfs |
28517
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
147 > def __call__(orig, self, path, *args, **kwargs): |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
148 > if path == 'data/f1.i': |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
149 > time.sleep(2) |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
150 > return orig(self, path, *args, **kwargs) |
31252
e7a35f18d91f
vfs: use 'vfs' module directly in 'test-clone-uncompressed'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
29064
diff
changeset
|
151 > extensions.wrapfunction(vfs.vfs, '__call__', __call__) |
28517
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
152 > EOF |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
153 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
154 prepare repo with small and big file to cover both code paths in emitrevlogdata |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
155 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
156 $ hg init repo |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
157 $ touch repo/f1 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
158 $ $TESTDIR/seq.py 50000 > repo/f2 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
159 $ hg -R repo ci -Aqm "0" |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34393
diff
changeset
|
160 $ hg serve -R repo -p $HGPORT1 -d --pid-file=hg.pid --config extensions.delayer=delayer.py |
28517
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
161 $ cat hg.pid >> $DAEMON_PIDS |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
162 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
163 clone while modifying the repo between stating file with write lock and |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
164 actually serving file content |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
165 |
34393
fffd3369aa83
commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents:
34322
diff
changeset
|
166 $ hg clone -q --stream -U http://localhost:$HGPORT1 clone & |
28517
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
167 $ sleep 1 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
168 $ echo >> repo/f1 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
169 $ echo >> repo/f2 |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
170 $ hg -R repo ci -m "1" |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
171 $ wait |
95163ababeb8
tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents:
28389
diff
changeset
|
172 $ hg -R clone id |
28518
aa440c3d7c5d
streamclone: fix error when store files grow while stream cloning
Mads Kiilerich <madski@unity3d.com>
parents:
28517
diff
changeset
|
173 000000000000 |