tests/test-clone-stream.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 28 Feb 2024 22:26:27 +0100
changeset 51538 d42006e0b130
parent 51537 715be2690d28
child 51539 f9a6bae0c937
permissions -rw-r--r--
stream-clone-test: simplify the background file closing test Here we just care about the fact the background file closing logic actually ran. We don't need to check the details of the cloning. The details of the output is very fragile and consume a lot of time for little value when adjusting formats, caches, and protocol. So we filter it out.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38063
538e850ae737 tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com>
parents: 37667
diff changeset
     1
#require serve no-reposimplestore no-chg
27897
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
     3
#testcases stream-legacy stream-bundle2-v2 stream-bundle2-v3
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
     4
39738
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39737
diff changeset
     5
#if stream-legacy
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
     6
  $ cat << EOF >> $HGRCPATH
39737
1b5880352314 bundle2: graduate bundle2.stream option from experimental to server section
Anton Shestakov <av6@dwimlabs.net>
parents: 39328
diff changeset
     7
  > [server]
39738
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39737
diff changeset
     8
  > bundle2.stream = no
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
     9
  > [format]
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
    10
  > # persistent nodemap is too broken with legacy format,
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
    11
  > # however client with nodemap support will have better stream support.
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
    12
  > use-persistent-nodemap=no
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
    13
  > EOF
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
    14
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
    15
#if stream-bundle2-v3
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
    16
  $ cat << EOF >> $HGRCPATH
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
    17
  > [experimental]
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
    18
  > stream-v3 = yes
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
    19
  > EOF
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
    20
#endif
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
    21
28389
9ab45fbe045e bdiff: (pure) support array.array arrays (issue5130)
timeless <timeless@mozdev.org>
parents: 27897
diff changeset
    22
Initialize repository
9ab45fbe045e bdiff: (pure) support array.array arrays (issue5130)
timeless <timeless@mozdev.org>
parents: 27897
diff changeset
    23
27897
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    24
  $ hg init server
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    25
  $ cd server
48620
a6f16ec07ed7 stream-clone: add a explicit test for format change during stream clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48344
diff changeset
    26
  $ sh $TESTDIR/testlib/stream_clone_setup.sh
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    27
  adding 00changelog-ab349180a0405010.nd
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    28
  adding 00changelog.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    29
  adding 00changelog.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    30
  adding 00changelog.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    31
  adding 00manifest.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    32
  adding 00manifest.i
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
    33
  adding container/isam-build-centos7/bazel-coverage-generator-sandboxfs-compatibility-0758e3e4f6057904d44399bd666faba9e7f40686.patch
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    34
  adding data/foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    35
  adding data/foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    36
  adding data/foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    37
  adding data/undo.babar
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    38
  adding data/undo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    39
  adding data/undo.foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    40
  adding data/undo.foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    41
  adding data/undo.foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    42
  adding data/undo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    43
  adding data/undo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    44
  adding data/undo.py
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    45
  adding foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    46
  adding foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    47
  adding foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    48
  adding meta/foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    49
  adding meta/foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    50
  adding meta/foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    51
  adding meta/undo.babar
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    52
  adding meta/undo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    53
  adding meta/undo.foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    54
  adding meta/undo.foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    55
  adding meta/undo.foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    56
  adding meta/undo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    57
  adding meta/undo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    58
  adding meta/undo.py
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    59
  adding savanah/foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    60
  adding savanah/foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    61
  adding savanah/foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    62
  adding savanah/undo.babar
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    63
  adding savanah/undo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    64
  adding savanah/undo.foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    65
  adding savanah/undo.foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    66
  adding savanah/undo.foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    67
  adding savanah/undo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    68
  adding savanah/undo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    69
  adding savanah/undo.py
47783
17211649bac2 clone: add a file with special character while testing uncompressed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47782
diff changeset
    70
  adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc)
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    71
  adding store/foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    72
  adding store/foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    73
  adding store/foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    74
  adding store/undo.babar
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    75
  adding store/undo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    76
  adding store/undo.foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    77
  adding store/undo.foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    78
  adding store/undo.foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    79
  adding store/undo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    80
  adding store/undo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    81
  adding store/undo.py
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    82
  adding undo.babar
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    83
  adding undo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    84
  adding undo.foo.d
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    85
  adding undo.foo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    86
  adding undo.foo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    87
  adding undo.i
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    88
  adding undo.n
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
    89
  adding undo.py
48620
a6f16ec07ed7 stream-clone: add a explicit test for format change during stream clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48344
diff changeset
    90
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
    91
  $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
    92
  $ cat hg.pid > $DAEMON_PIDS
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
    93
  $ cd ..
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
    94
47782
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
    95
Check local clone
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
    96
==================
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
    97
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
    98
The logic is close enough of uncompressed.
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
    99
This is present here to reuse the testing around file with "special" names.
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   100
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   101
  $ hg clone server local-clone
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   102
  updating to branch default
47863
132525ead0db clone: properly create target directories during local clone (issue6581)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47862
diff changeset
   103
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
47782
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   104
47861
bf47cc3799ea clone: verify the local clone in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47860
diff changeset
   105
Check that the clone went well
bf47cc3799ea clone: verify the local clone in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47860
diff changeset
   106
49920
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48821
diff changeset
   107
  $ hg verify -R local-clone -q
47782
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   108
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   109
Check uncompressed
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   110
==================
085ebc80f84b clone: test local clone in `test-clone-uncompressed.t` too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47659
diff changeset
   111
51533
749e7685935a stream-clone-test: simplify the case where server disabled it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51202
diff changeset
   112
Cannot stream clone when server.uncompressed is set to false
749e7685935a stream-clone-test: simplify the case where server disabled it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51202
diff changeset
   113
------------------------------------------------------------
749e7685935a stream-clone-test: simplify the case where server disabled it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51202
diff changeset
   114
749e7685935a stream-clone-test: simplify the case where server disabled it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51202
diff changeset
   115
When `server.uncompressed` is disabled, the client should fallback to a bundle
749e7685935a stream-clone-test: simplify the case where server disabled it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51202
diff changeset
   116
based clone with a warning.
749e7685935a stream-clone-test: simplify the case where server disabled it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51202
diff changeset
   117
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   118
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   119
  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   120
  200 Script output follows
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   121
  
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   122
  1
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   123
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   124
  $ hg debugcapabilities http://localhost:$HGPORT
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   125
  Main capabilities:
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   126
    batch
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   127
    branchmap
35792
1d118f9f4f57 bundle2: always advertise client support for stream parts
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35791
diff changeset
   128
    $USUAL_BUNDLE2_CAPS_SERVER$
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   129
    changegroupsubset
35806
ab239e3de23b tests: add a pattern to fix --pure tests
Augie Fackler <augie@google.com>
parents: 35805
diff changeset
   130
    compression=$BUNDLE2_COMPRESSIONS$
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   131
    getbundle
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   132
    httpheader=1024
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   133
    httpmediatype=0.1rx,0.1tx,0.2tx
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   134
    known
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   135
    lookup
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   136
    pushkey
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   137
    unbundle=HG10GZ,HG10BZ,HG10UN
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   138
    unbundlehash
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   139
  Bundle2 capabilities:
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   140
    HG20
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   141
    bookmarks
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   142
    changegroup
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   143
      01
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   144
      02
50415
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49920
diff changeset
   145
      03
44439
edc8504bc26b exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42935
diff changeset
   146
    checkheads
edc8504bc26b exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42935
diff changeset
   147
      related
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   148
    digests
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   149
      md5
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   150
      sha1
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   151
      sha512
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   152
    error
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   153
      abort
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   154
      unsupportedcontent
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   155
      pushraced
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   156
      pushkey
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   157
    hgtagsfnodes
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   158
    listkeys
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   159
    phases
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   160
      heads
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   161
    pushkey
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   162
    remote-changegroup
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   163
      http
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   164
      https
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   165
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   166
  $ hg clone --stream -U http://localhost:$HGPORT server-disabled
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   167
  warning: stream clone requested but server has them disabled
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   168
  requesting all changes
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   169
  adding changesets
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   170
  adding manifests
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   171
  adding file changes
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   172
  added 3 changesets with 1088 changes to 1088 files
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   173
  new changesets 96ee1d7354c4:5223b5e3265f
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   174
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   175
  $ killdaemons.py
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   176
  $ cd server
46983
e38718838808 streamclone: check the errors log in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46977
diff changeset
   177
  $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   178
  $ cat hg.pid > $DAEMON_PIDS
27897
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   179
  $ cd ..
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   180
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   181
Basic clone
51534
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   182
-----------
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   183
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   184
Check that --stream trigger a stream clone and result in a valid repositoty
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   185
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   186
We check the associated output for exact bytes on file number as changes in
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   187
these value implies changes in the data transfered and can detect unintended
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   188
changes in the process.
27897
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   189
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   190
#if stream-legacy
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   191
  $ hg clone --stream -U http://localhost:$HGPORT clone1
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   192
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   193
  1091 files to transfer, 102 KB of data (no-zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   194
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   195
  1091 files to transfer, 98.8 KB of data (zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   196
  transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   197
  searching for changes
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   198
  no changes found
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   199
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   200
#if stream-bundle2-v2
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   201
  $ hg clone --stream -U http://localhost:$HGPORT clone1
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   202
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   203
  1094 files to transfer, 102 KB of data (no-zstd !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   204
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   205
  1094 files to transfer, 98.9 KB of data (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   206
  transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   207
  1096 files to transfer, 99.0 KB of data (zstd rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   208
  transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
51534
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   209
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   210
51534
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   211
#if stream-bundle2-v3
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   212
  $ hg clone --stream -U http://localhost:$HGPORT clone1
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   213
  streaming all changes
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   214
  1093 entries to transfer
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   215
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   216
  transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   217
  transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   218
#endif
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   219
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   220
#if no-stream-legacy
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   221
  $ ls -1 clone1/.hg/cache
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   222
  branch2-base
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   223
  branch2-immutable
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   224
  branch2-served
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   225
  branch2-served.hidden
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   226
  branch2-visible
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   227
  branch2-visible-hidden
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   228
  rbc-names-v1
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   229
  rbc-revs-v1
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   230
  tags2
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   231
  tags2-served
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   232
#endif
35767
5f5fb279fd39 streamclone: also stream caches to the client
Boris Feld <boris.feld@octobus.net>
parents: 35765
diff changeset
   233
51534
a72ab2ec5315 stream-clone-test: factor some piece of basic clone test out
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51533
diff changeset
   234
  $ hg -R clone1 verify --quiet
46983
e38718838808 streamclone: check the errors log in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46977
diff changeset
   235
  $ cat server/errors.txt
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   236
35787
a84dbc87dae9 exchange: send bundle2 stream clones uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35767
diff changeset
   237
getbundle requests with stream=1 are uncompressed
51535
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   238
-------------------------------------------------
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   239
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   240
We check that `getbundle` will return a stream bundle when requested.
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   241
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   242
XXX manually building the --requestheader is fragile and will drift away from actual usage
35787
a84dbc87dae9 exchange: send bundle2 stream clones uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35767
diff changeset
   243
50553
3c0da0fa0eed stream-clone: check the version of streaming clone supported by the client
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50551
diff changeset
   244
  $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto '0.1 0.2 comp=zlib,none' --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
35787
a84dbc87dae9 exchange: send bundle2 stream clones uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35767
diff changeset
   245
  200 Script output follows
a84dbc87dae9 exchange: send bundle2 stream clones uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35767
diff changeset
   246
  content-type: application/mercurial-0.2
a84dbc87dae9 exchange: send bundle2 stream clones uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35767
diff changeset
   247
  
a84dbc87dae9 exchange: send bundle2 stream clones uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35767
diff changeset
   248
51535
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   249
  $ f --size --hex --bytes 48 body
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   250
  body: size=* (glob)
47289
6a60f03d2241 tests: More cleanly separate expected hexdump output
Simon Sapin <simon.sapin@octobus.net>
parents: 47043
diff changeset
   251
  0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
51535
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   252
  0010: ?? 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |?.STREAM2.......| (glob)
b0d08bdc6a60 stream-clone-test: simplify the test for getbundle with stream=1
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51534
diff changeset
   253
  0020: 06 09 04 0c ?? 62 79 74 65 63 6f 75 6e 74 31 30 |....?bytecount10| (glob)
35787
a84dbc87dae9 exchange: send bundle2 stream clones uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35767
diff changeset
   254
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   255
--uncompressed is an alias to --stream
51537
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   256
---------------------------------------
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   257
51537
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   258
The alias flag should trigger a stream clone too.
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   259
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   260
  $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   261
  streaming all changes
51537
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   262
  * files to transfer* (glob) (no-stream-bundle2-v3 !)
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   263
  * entries to transfer (glob) (stream-bundle2-v3 !)
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   264
  transferred * KB in * seconds (* */sec) (glob)
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   265
  searching for changes (stream-legacy !)
715be2690d28 stream-clone-test: simplify the --uncompressed alias check
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51535
diff changeset
   266
  no changes found (stream-legacy !)
27897
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   267
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   268
Clone with background file closing enabled
51538
d42006e0b130 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51537
diff changeset
   269
-------------------------------------------
27897
2fdbf22a1b63 streamclone: use backgroundfilecloser (issue4889)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   270
51538
d42006e0b130 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51537
diff changeset
   271
The backgound file closing logic should trigger when configured to do so, and
d42006e0b130 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51537
diff changeset
   272
the result should be a valid repository.
d42006e0b130 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51537
diff changeset
   273
d42006e0b130 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51537
diff changeset
   274
  $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep "background file closing"
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   275
  starting 4 threads for background file closing
51538
d42006e0b130 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51537
diff changeset
   276
  starting 4 threads for background file closing (no-stream-legacy !)
d42006e0b130 stream-clone-test: simplify the background file closing test
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51537
diff changeset
   277
  $ hg verify -R clone-background --quiet
28517
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   278
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   279
Cannot stream clone when there are secret changesets
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   280
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   281
  $ hg -R server phase --force --secret -r tip
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   282
  $ hg clone --stream -U http://localhost:$HGPORT secret-denied
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   283
  warning: stream clone requested but server has them disabled
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   284
  requesting all changes
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   285
  adding changesets
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   286
  adding manifests
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   287
  adding file changes
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   288
  added 2 changesets with 1025 changes to 1025 files
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   289
  new changesets 96ee1d7354c4:c17445101a72
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   290
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   291
  $ killdaemons.py
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   292
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   293
Streaming of secrets can be overridden by server config
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   294
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   295
  $ cd server
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34394
diff changeset
   296
  $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   297
  $ cat hg.pid > $DAEMON_PIDS
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   298
  $ cd ..
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   299
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   300
#if stream-legacy
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   301
  $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   302
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   303
  1091 files to transfer, 102 KB of data (no-zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   304
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   305
  1091 files to transfer, 98.8 KB of data (zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   306
  transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   307
  searching for changes
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   308
  no changes found
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   309
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   310
#if stream-bundle2-v2
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   311
  $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   312
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   313
  1094 files to transfer, 102 KB of data (no-zstd !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   314
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   315
  1094 files to transfer, 98.9 KB of data (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   316
  transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   317
  1096 files to transfer, 99.0 KB of data (zstd rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   318
  transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   319
#endif
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   320
#if stream-bundle2-v3
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   321
  $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   322
  streaming all changes
50706
0452af304808 stream-clone: add a v3 version of the protocol
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50655
diff changeset
   323
  1093 entries to transfer
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   324
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   325
  transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   326
  transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !)
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   327
#endif
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   328
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   329
  $ killdaemons.py
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   330
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   331
Verify interaction between preferuncompressed and secret presence
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   332
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   333
  $ cd server
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34394
diff changeset
   334
  $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   335
  $ cat hg.pid > $DAEMON_PIDS
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   336
  $ cd ..
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   337
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   338
  $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   339
  requesting all changes
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   340
  adding changesets
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   341
  adding manifests
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   342
  adding file changes
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   343
  added 2 changesets with 1025 changes to 1025 files
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   344
  new changesets 96ee1d7354c4:c17445101a72
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   345
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   346
  $ killdaemons.py
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   347
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   348
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: 31262
diff changeset
   349
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   350
  $ cd server
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34394
diff changeset
   351
  $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   352
  $ cat hg.pid > $DAEMON_PIDS
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   353
  $ cd ..
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   354
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   355
  $ hg clone --stream http://localhost:$HGPORT secret-full-disabled
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   356
  warning: stream clone requested but server has them disabled
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   357
  requesting all changes
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   358
  remote: abort: server has pull-based clones disabled
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   359
  abort: pull failed on remote
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   360
  (remove --pull if specified or upgrade Mercurial)
46977
3f87d2af0bd6 errors: raise RemoteError in some places in exchange.py
Martin von Zweigbergk <martinvonz@google.com>
parents: 46884
diff changeset
   361
  [100]
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   362
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   363
Local stream clone with secrets involved
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   364
(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: 31262
diff changeset
   365
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: 31262
diff changeset
   366
34394
fffd3369aa83 commands: rename clone --uncompressed to --stream and document
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34329
diff changeset
   367
  $ hg clone -U --stream server local-secret
32764
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   368
  warning: stream clone requested but server has them disabled
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   369
  requesting all changes
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   370
  adding changesets
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   371
  adding manifests
33b7283a3828 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31262
diff changeset
   372
  adding file changes
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   373
  added 2 changesets with 1025 changes to 1025 files
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   374
  new changesets 96ee1d7354c4:c17445101a72
28517
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   375
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   376
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
   377
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   378
  $ mkdir changing
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   379
  $ cd changing
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   380
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   381
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
   382
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   383
  $ hg init repo
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   384
  $ touch repo/f1
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   385
  $ $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
   386
  $ hg -R repo ci -Aqm "0"
46986
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   387
  $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1"
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   388
  $ export HG_TEST_STREAM_WALKED_FILE_1
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   389
  $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2"
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   390
  $ export HG_TEST_STREAM_WALKED_FILE_2
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   391
  $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3"
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   392
  $ export HG_TEST_STREAM_WALKED_FILE_3
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   393
#   $ cat << EOF >> $HGRCPATH
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   394
#   > [hooks]
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   395
#   > pre-clone=rm -f "$TESTTMP/sync_file_walked_*"
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   396
#   > EOF
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   397
  $ hg serve -R repo -p $HGPORT1 -d --error errors.log --pid-file=hg.pid --config extensions.stream_steps="$RUNTESTDIR/testlib/ext-stream-clone-steps.py"
28517
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   398
  $ 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
   399
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   400
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
   401
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
   402
46986
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   403
  $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_3") &
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   404
  $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
28517
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   405
  $ echo >> repo/f1
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   406
  $ echo >> repo/f2
45077
23119371df5e test-clone-uncompressed: use config to silence the lock warning
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45031
diff changeset
   407
  $ hg -R repo ci -m "1" --config ui.timeout.warn=-1
46986
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   408
  $ touch $HG_TEST_STREAM_WALKED_FILE_2
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   409
  $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
28517
95163ababeb8 tests: add test of stream clone of repo that is changing
Mads Kiilerich <madski@unity3d.com>
parents: 28389
diff changeset
   410
  $ 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
   411
  000000000000
46986
faa43f09ad98 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46983
diff changeset
   412
  $ cat errors.log
35747
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   413
  $ cd ..
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   414
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   415
Stream repository with bookmarks
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   416
--------------------------------
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   417
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   418
(revert introduction of secret changeset)
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   419
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   420
  $ hg -R server phase --draft 'secret()'
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   421
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   422
add a bookmark
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   423
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   424
  $ hg -R server bookmark -r tip some-bookmark
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   425
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   426
clone it
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   427
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   428
#if stream-legacy
35747
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   429
  $ hg clone --stream http://localhost:$HGPORT with-bookmarks
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   430
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   431
  1091 files to transfer, 102 KB of data (no-zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   432
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   433
  1091 files to transfer, 98.8 KB of data (zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   434
  transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
35747
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   435
  searching for changes
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   436
  no changes found
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   437
  updating to branch default
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   438
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   439
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   440
#if stream-bundle2-v2
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   441
  $ hg clone --stream http://localhost:$HGPORT with-bookmarks
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   442
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   443
  1097 files to transfer, 102 KB of data (no-zstd !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   444
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   445
  1097 files to transfer, 99.1 KB of data (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   446
  transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   447
  1099 files to transfer, 99.2 KB of data (zstd rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   448
  transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   449
  updating to branch default
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   450
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   451
#endif
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   452
#if stream-bundle2-v3
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   453
  $ hg clone --stream http://localhost:$HGPORT with-bookmarks
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   454
  streaming all changes
50706
0452af304808 stream-clone: add a v3 version of the protocol
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50655
diff changeset
   455
  1096 entries to transfer
47783
17211649bac2 clone: add a file with special character while testing uncompressed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47782
diff changeset
   456
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   457
  transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   458
  transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !)
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   459
  updating to branch default
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   460
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
35763
7eedbd5d4880 streamclone: add support for bundle2 based stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35747
diff changeset
   461
#endif
49920
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48821
diff changeset
   462
  $ hg verify -R with-bookmarks -q
35747
de32acb24949 stream: add a test showing we also clone bookmarks
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
   463
  $ hg -R with-bookmarks bookmarks
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   464
     some-bookmark             2:5223b5e3265f
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   465
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   466
Stream repository with phases
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   467
-----------------------------
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   468
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   469
Clone as publishing
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   470
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   471
  $ hg -R server phase -r 'all()'
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   472
  0: draft
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   473
  1: draft
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   474
  2: draft
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   475
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   476
#if stream-legacy
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   477
  $ hg clone --stream http://localhost:$HGPORT phase-publish
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   478
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   479
  1091 files to transfer, 102 KB of data (no-zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   480
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   481
  1091 files to transfer, 98.8 KB of data (zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   482
  transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   483
  searching for changes
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   484
  no changes found
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   485
  updating to branch default
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   486
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   487
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   488
#if stream-bundle2-v2
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   489
  $ hg clone --stream http://localhost:$HGPORT phase-publish
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   490
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   491
  1097 files to transfer, 102 KB of data (no-zstd !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   492
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   493
  1097 files to transfer, 99.1 KB of data (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   494
  transferred 99.1 KB in * seconds (* */sec) (glob) (zstd  no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   495
  1099 files to transfer, 99.2 KB of data (zstd rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   496
  transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   497
  updating to branch default
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   498
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   499
#endif
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   500
#if stream-bundle2-v3
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   501
  $ hg clone --stream http://localhost:$HGPORT phase-publish
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   502
  streaming all changes
50706
0452af304808 stream-clone: add a v3 version of the protocol
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50655
diff changeset
   503
  1096 entries to transfer
47783
17211649bac2 clone: add a file with special character while testing uncompressed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47782
diff changeset
   504
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   505
  transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   506
  transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !)
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   507
  updating to branch default
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   508
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   509
#endif
49920
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48821
diff changeset
   510
  $ hg verify -R phase-publish -q
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   511
  $ hg -R phase-publish phase -r 'all()'
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   512
  0: public
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   513
  1: public
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   514
  2: public
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   515
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   516
Clone as non publishing
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   517
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   518
  $ cat << EOF >> server/.hg/hgrc
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   519
  > [phases]
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   520
  > publish = False
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   521
  > EOF
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   522
  $ killdaemons.py
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   523
  $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid
35789
8ed5f7609728 tests: add more testing around server.uncompressed
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35788
diff changeset
   524
  $ cat hg.pid > $DAEMON_PIDS
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   525
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   526
#if stream-legacy
35805
784ac51f8bab streamclone: add a comment about non-publishing being broken with v1
Boris Feld <boris.feld@octobus.net>
parents: 35793
diff changeset
   527
784ac51f8bab streamclone: add a comment about non-publishing being broken with v1
Boris Feld <boris.feld@octobus.net>
parents: 35793
diff changeset
   528
With v1 of the stream protocol, changeset are always cloned as public. It make
784ac51f8bab streamclone: add a comment about non-publishing being broken with v1
Boris Feld <boris.feld@octobus.net>
parents: 35793
diff changeset
   529
stream v1 unsuitable for non-publishing repository.
784ac51f8bab streamclone: add a comment about non-publishing being broken with v1
Boris Feld <boris.feld@octobus.net>
parents: 35793
diff changeset
   530
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   531
  $ hg clone --stream http://localhost:$HGPORT phase-no-publish
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   532
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   533
  1091 files to transfer, 102 KB of data (no-zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   534
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   535
  1091 files to transfer, 98.8 KB of data (zstd !)
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   536
  transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   537
  searching for changes
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   538
  no changes found
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   539
  updating to branch default
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   540
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   541
  $ hg -R phase-no-publish phase -r 'all()'
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   542
  0: public
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   543
  1: public
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   544
  2: public
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   545
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   546
#if stream-bundle2-v2
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   547
  $ hg clone --stream http://localhost:$HGPORT phase-no-publish
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   548
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   549
  1098 files to transfer, 102 KB of data (no-zstd !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   550
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   551
  1098 files to transfer, 99.1 KB of data (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   552
  transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   553
  1100 files to transfer, 99.2 KB of data (zstd rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   554
  transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   555
  updating to branch default
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   556
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   557
  $ hg -R phase-no-publish phase -r 'all()'
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   558
  0: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   559
  1: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   560
  2: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   561
#endif
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   562
#if stream-bundle2-v3
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   563
  $ hg clone --stream http://localhost:$HGPORT phase-no-publish
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   564
  streaming all changes
50706
0452af304808 stream-clone: add a v3 version of the protocol
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50655
diff changeset
   565
  1097 entries to transfer
47783
17211649bac2 clone: add a file with special character while testing uncompressed
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47782
diff changeset
   566
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   567
  transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   568
  transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !)
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   569
  updating to branch default
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   570
  1088 files updated, 0 files merged, 0 files removed, 0 files unresolved
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   571
  $ hg -R phase-no-publish phase -r 'all()'
35765
56c30b31afbe streamclone: add support for cloning non append-only file
Boris Feld <boris.feld@octobus.net>
parents: 35764
diff changeset
   572
  0: draft
56c30b31afbe streamclone: add support for cloning non append-only file
Boris Feld <boris.feld@octobus.net>
parents: 35764
diff changeset
   573
  1: draft
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   574
  2: draft
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   575
#endif
49920
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48821
diff changeset
   576
  $ hg verify -R phase-no-publish -q
35764
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   577
b6ffd4194639 streamclone: tests phase exchange during stream clone
Boris Feld <boris.feld@octobus.net>
parents: 35763
diff changeset
   578
  $ killdaemons.py
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   579
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   580
#if stream-legacy
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   581
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   582
With v1 of the stream protocol, changeset are always cloned as public. There's
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   583
no obsolescence markers exchange in stream v1.
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   584
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   585
#endif
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   586
#if stream-bundle2-v2
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   587
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   588
Stream repository with obsolescence
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   589
-----------------------------------
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   590
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   591
Clone non-publishing with obsolescence
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   592
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   593
  $ cat >> $HGRCPATH << EOF
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   594
  > [experimental]
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   595
  > evolution=all
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   596
  > EOF
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   597
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   598
  $ cd server
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   599
  $ echo foo > foo
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   600
  $ hg -q commit -m 'about to be pruned'
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   601
  $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   602
  1 new obsolescence markers
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   603
  obsoleted 1 changesets
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   604
  $ hg up null -q
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   605
  $ hg log -T '{rev}: {phase}\n'
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   606
  2: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   607
  1: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   608
  0: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   609
  $ hg serve -p $HGPORT -d --pid-file=hg.pid
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   610
  $ cat hg.pid > $DAEMON_PIDS
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   611
  $ cd ..
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   612
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   613
  $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   614
  streaming all changes
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   615
  1099 files to transfer, 102 KB of data (no-zstd !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   616
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   617
  1099 files to transfer, 99.5 KB of data (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   618
  transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   619
  1101 files to transfer, 99.6 KB of data (zstd rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   620
  transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !)
50558
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   621
  $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   622
  2: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   623
  1: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   624
  0: draft
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   625
  $ hg debugobsolete -R with-obsolescence
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   626
  8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   627
  $ hg verify -R with-obsolescence -q
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   628
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   629
  $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   630
  streaming all changes
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   631
  remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   632
  abort: pull failed on remote
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   633
  [100]
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   634
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   635
  $ killdaemons.py
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   636
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   637
#endif
58adcabc295f stream-clone: introduce the notion of an experimental "v3" version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50553
diff changeset
   638
#if stream-bundle2-v3
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   639
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   640
Stream repository with obsolescence
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   641
-----------------------------------
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   642
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   643
Clone non-publishing with obsolescence
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   644
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   645
  $ cat >> $HGRCPATH << EOF
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   646
  > [experimental]
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   647
  > evolution=all
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   648
  > EOF
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   649
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   650
  $ cd server
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   651
  $ echo foo > foo
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   652
  $ hg -q commit -m 'about to be pruned'
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   653
  $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
42899
34a46d48d24e debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 40991
diff changeset
   654
  1 new obsolescence markers
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   655
  obsoleted 1 changesets
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   656
  $ hg up null -q
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   657
  $ hg log -T '{rev}: {phase}\n'
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   658
  2: draft
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   659
  1: draft
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   660
  0: draft
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   661
  $ hg serve -p $HGPORT -d --pid-file=hg.pid
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   662
  $ cat hg.pid > $DAEMON_PIDS
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   663
  $ cd ..
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   664
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   665
  $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   666
  streaming all changes
50706
0452af304808 stream-clone: add a v3 version of the protocol
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50655
diff changeset
   667
  1098 entries to transfer
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   668
  transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
51202
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   669
  transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !)
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50789
diff changeset
   670
  transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !)
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   671
  $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
47659
f030c7d22032 walk: no longer ignore revlogs of files starting with `undo.` (issue6542)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47290
diff changeset
   672
  2: draft
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   673
  1: draft
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   674
  0: draft
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   675
  $ hg debugobsolete -R with-obsolescence
47862
67af3b3173b7 clone: add a file demonstrating issue6581 in test-clone-stream.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47861
diff changeset
   676
  8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
49920
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48821
diff changeset
   677
  $ hg verify -R with-obsolescence -q
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   678
40399
4ab6e7b4fe8a streamclone: abort when client needs to handle obsmarkers, but doesn't
Anton Shestakov <av6@dwimlabs.net>
parents: 40398
diff changeset
   679
  $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
4ab6e7b4fe8a streamclone: abort when client needs to handle obsmarkers, but doesn't
Anton Shestakov <av6@dwimlabs.net>
parents: 40398
diff changeset
   680
  streaming all changes
4ab6e7b4fe8a streamclone: abort when client needs to handle obsmarkers, but doesn't
Anton Shestakov <av6@dwimlabs.net>
parents: 40398
diff changeset
   681
  remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
4ab6e7b4fe8a streamclone: abort when client needs to handle obsmarkers, but doesn't
Anton Shestakov <av6@dwimlabs.net>
parents: 40398
diff changeset
   682
  abort: pull failed on remote
46977
3f87d2af0bd6 errors: raise RemoteError in some places in exchange.py
Martin von Zweigbergk <martinvonz@google.com>
parents: 46884
diff changeset
   683
  [100]
40399
4ab6e7b4fe8a streamclone: abort when client needs to handle obsmarkers, but doesn't
Anton Shestakov <av6@dwimlabs.net>
parents: 40398
diff changeset
   684
40398
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   685
  $ killdaemons.py
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   686
0ac794e0e285 streamclone: include obsstore file into stream bundle if client can read it
Anton Shestakov <av6@dwimlabs.net>
parents: 40035
diff changeset
   687
#endif
48821
d9ed7c5e915d streamclone: avoid some obscure error in a corner case
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 48811
diff changeset
   688
d9ed7c5e915d streamclone: avoid some obscure error in a corner case
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 48811
diff changeset
   689
Cloning a repo with no requirements doesn't give some obscure error
d9ed7c5e915d streamclone: avoid some obscure error in a corner case
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 48811
diff changeset
   690
d9ed7c5e915d streamclone: avoid some obscure error in a corner case
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 48811
diff changeset
   691
  $ mkdir -p empty-repo/.hg
d9ed7c5e915d streamclone: avoid some obscure error in a corner case
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 48811
diff changeset
   692
  $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo2
d9ed7c5e915d streamclone: avoid some obscure error in a corner case
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents: 48811
diff changeset
   693
  $ hg --cwd empty-repo2 verify -q
50789
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   694
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   695
Cloning a repo with an empty manifestlog doesn't give some weird error
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   696
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   697
  $ rm -r empty-repo; hg init empty-repo
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   698
  $ (cd empty-repo; touch x; hg commit -Am empty; hg debugstrip -r 0) > /dev/null
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   699
  $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo3
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   700
  $ hg --cwd empty-repo3 verify -q 2>&1 | grep -v warning
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   701
  [1]
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   702
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   703
The warnings filtered out here are talking about zero-length 'orphan' data files.
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   704
Those are harmless, so that's fine.
74c004a515bc stream-clone: fix a crash when a repo with an empty revlog is cloned
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50706
diff changeset
   705