| 1 |
#require no-windows |
| 2 |
|
| 3 |
$ . "$TESTDIR/remotefilelog-library.sh" |
| 4 |
|
| 5 |
$ hg init master |
| 6 |
$ cd master |
| 7 |
$ cat >> .hg/hgrc <<EOF |
| 8 |
> [remotefilelog] |
| 9 |
> server=True |
| 10 |
> EOF |
| 11 |
$ echo x > x |
| 12 |
$ hg commit -qAm x |
| 13 |
|
| 14 |
$ cd .. |
| 15 |
|
| 16 |
# shallow clone from full |
| 17 |
|
| 18 |
$ hgcloneshallow ssh://user@dummy/master shallow --noupdate |
| 19 |
streaming all changes |
| 20 |
* to transfer, * bytes of data (glob) |
| 21 |
stream-cloned * files / * bytes in * seconds (*/sec) (glob) |
| 22 |
searching for changes |
| 23 |
no changes found |
| 24 |
$ cd shallow |
| 25 |
$ hg debugrequires |
| 26 |
dotencode |
| 27 |
dirstate-v2 (dirstate-v2 !) |
| 28 |
exp-remotefilelog-repo-req-1 |
| 29 |
fncache |
| 30 |
generaldelta |
| 31 |
persistent-nodemap (rust !) |
| 32 |
revlog-compression-zstd (zstd !) |
| 33 |
revlogv1 |
| 34 |
share-safe |
| 35 |
sparserevlog |
| 36 |
store |
| 37 |
|
| 38 |
$ hg update |
| 39 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 40 |
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) |
| 41 |
|
| 42 |
$ cat x |
| 43 |
x |
| 44 |
|
| 45 |
$ ls .hg/store/data |
| 46 |
$ echo foo > f |
| 47 |
$ hg add f |
| 48 |
$ hg ci -m 'local content' |
| 49 |
$ ls .hg/store/data |
| 50 |
4a0a19218e082a343a1b17e5333409af9d98f0f5 |
| 51 |
|
| 52 |
$ cd .. |
| 53 |
|
| 54 |
# shallow clone from shallow |
| 55 |
|
| 56 |
$ hgcloneshallow ssh://user@dummy/shallow shallow2 --noupdate |
| 57 |
streaming all changes |
| 58 |
* to transfer, * bytes of data (glob) |
| 59 |
stream-cloned * files / * bytes in * seconds (*/sec) (glob) |
| 60 |
searching for changes |
| 61 |
no changes found |
| 62 |
$ cd shallow2 |
| 63 |
$ hg debugrequires |
| 64 |
dotencode |
| 65 |
dirstate-v2 (dirstate-v2 !) |
| 66 |
exp-remotefilelog-repo-req-1 |
| 67 |
fncache |
| 68 |
generaldelta |
| 69 |
persistent-nodemap (rust !) |
| 70 |
revlog-compression-zstd (zstd !) |
| 71 |
revlogv1 |
| 72 |
share-safe |
| 73 |
sparserevlog |
| 74 |
store |
| 75 |
$ ls .hg/store/data |
| 76 |
4a0a19218e082a343a1b17e5333409af9d98f0f5 |
| 77 |
|
| 78 |
$ hg update |
| 79 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 80 |
|
| 81 |
$ cat x |
| 82 |
x |
| 83 |
|
| 84 |
$ cd .. |
| 85 |
|
| 86 |
# full clone from shallow |
| 87 |
|
| 88 |
Note: the output to STDERR comes from a different process to the output on |
| 89 |
STDOUT and their relative ordering is not deterministic. As a result, the test |
| 90 |
was failing sporadically. To avoid this, we capture STDERR to a file and |
| 91 |
check its contents separately. |
| 92 |
|
| 93 |
$ TEMP_STDERR=full-clone-from-shallow.stderr.tmp |
| 94 |
$ hg clone --noupdate ssh://user@dummy/shallow full 2>$TEMP_STDERR |
| 95 |
streaming all changes |
| 96 |
[100] |
| 97 |
$ cat $TEMP_STDERR |
| 98 |
remote: abort: Cannot clone from a shallow repo to a full repo. |
| 99 |
abort: pull failed on remote |
| 100 |
$ rm $TEMP_STDERR |
| 101 |
|
| 102 |
# getbundle full clone |
| 103 |
|
| 104 |
$ printf '[server]\npreferuncompressed=False\n' >> master/.hg/hgrc |
| 105 |
$ hgcloneshallow ssh://user@dummy/master shallow3 |
| 106 |
requesting all changes |
| 107 |
adding changesets |
| 108 |
adding manifests |
| 109 |
adding file changes |
| 110 |
added 1 changesets with 0 changes to 0 files |
| 111 |
new changesets b292c1e3311f |
| 112 |
updating to branch default |
| 113 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 114 |
|
| 115 |
$ ls shallow3/.hg/store/data |
| 116 |
$ hg debugrequires -R shallow3/ |
| 117 |
dotencode |
| 118 |
dirstate-v2 (dirstate-v2 !) |
| 119 |
exp-remotefilelog-repo-req-1 |
| 120 |
fncache |
| 121 |
generaldelta |
| 122 |
persistent-nodemap (rust !) |
| 123 |
revlog-compression-zstd (zstd !) |
| 124 |
revlogv1 |
| 125 |
share-safe |
| 126 |
sparserevlog |
| 127 |
store |