author | Pulkit Goyal <pulkit@yandex-team.ru> |
Sat, 20 Oct 2018 00:12:20 +0300 | |
changeset 40411 | bad46c934c31 |
parent 40338 | af62936c2508 |
child 40494 | 9aeb9e2d28a7 |
permissions | -rw-r--r-- |
40338
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
1 |
Tests narrow stream clones |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
2 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
3 |
$ . "$TESTDIR/narrow-library.sh" |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
4 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
5 |
Server setup |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
6 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
7 |
$ hg init master |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
8 |
$ cd master |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
9 |
$ mkdir dir |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
10 |
$ mkdir dir/src |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
11 |
$ cd dir/src |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
12 |
$ for x in `$TESTDIR/seq.py 20`; do echo $x > "f$x"; hg add "f$x"; hg commit -m "Commit src $x"; done |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
13 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
14 |
$ cd .. |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
15 |
$ mkdir tests |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
16 |
$ cd tests |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
17 |
$ for x in `$TESTDIR/seq.py 20`; do echo $x > "f$x"; hg add "f$x"; hg commit -m "Commit src $x"; done |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
18 |
$ cd ../../.. |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
19 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
20 |
Trying to stream clone when the server does not support it |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
21 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
22 |
$ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10" --stream |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
23 |
streaming all changes |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
24 |
remote: abort: server does not support narrow stream clones |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
25 |
abort: pull failed on remote |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
26 |
[255] |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
27 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
28 |
Enable stream clone on the server |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
29 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
30 |
$ echo "[server]" >> master/.hg/hgrc |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
31 |
$ echo "stream-narrow-clones=True" >> master/.hg/hgrc |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
32 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
33 |
Cloning a specific file when stream clone is supported |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
34 |
|
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
35 |
$ hg clone --narrow ssh://user@dummy/master narrow --noupdate --include "dir/src/f10" --stream |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
36 |
streaming all changes |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
37 |
remote: abort: server does not support narrow stream clones |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
38 |
abort: pull failed on remote |
af62936c2508
streamclone: new server config and some API changes for narrow stream clones
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff
changeset
|
39 |
[255] |