| 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 > foo |
| 12 |
$ echo y > bar |
| 13 |
$ hg commit -qAm one |
| 14 |
|
| 15 |
$ cd .. |
| 16 |
|
| 17 |
# partial shallow clone |
| 18 |
|
| 19 |
$ hg clone --shallow ssh://user@dummy/master shallow --noupdate --config remotefilelog.includepattern=foo |
| 20 |
streaming all changes |
| 21 |
4 files to transfer, 336 bytes of data (no-zstd !) |
| 22 |
stream-cloned 4 files / 336 bytes in * seconds (* */sec) (glob) (no-zstd !) |
| 23 |
4 files to transfer, 338 bytes of data (zstd no-rust !) |
| 24 |
stream-cloned 4 files / 338 bytes in * seconds (* */sec) (glob) (zstd no-rust !) |
| 25 |
6 files to transfer, 464 bytes of data (zstd rust !) |
| 26 |
stream-cloned 6 files / 464 bytes in * seconds (*/sec) (glob) (zstd rust !) |
| 27 |
searching for changes |
| 28 |
no changes found |
| 29 |
$ cat >> shallow/.hg/hgrc <<EOF |
| 30 |
> [remotefilelog] |
| 31 |
> cachepath=$PWD/hgcache |
| 32 |
> debug=True |
| 33 |
> includepattern=foo |
| 34 |
> reponame = master |
| 35 |
> [extensions] |
| 36 |
> remotefilelog= |
| 37 |
> EOF |
| 38 |
$ ls shallow/.hg/store/data |
| 39 |
bar.i |
| 40 |
|
| 41 |
# update partial clone |
| 42 |
|
| 43 |
$ cd shallow |
| 44 |
$ hg update |
| 45 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 46 |
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) |
| 47 |
$ cat foo |
| 48 |
x |
| 49 |
$ cat bar |
| 50 |
y |
| 51 |
$ cd .. |
| 52 |
|
| 53 |
# pull partial clone |
| 54 |
|
| 55 |
$ cd master |
| 56 |
$ echo a >> foo |
| 57 |
$ echo b >> bar |
| 58 |
$ hg commit -qm two |
| 59 |
$ cd ../shallow |
| 60 |
$ hg pull |
| 61 |
pulling from ssh://user@dummy/master |
| 62 |
searching for changes |
| 63 |
adding changesets |
| 64 |
adding manifests |
| 65 |
adding file changes |
| 66 |
added 1 changesets with 0 changes to 0 files |
| 67 |
new changesets a9688f18cb91 |
| 68 |
(run 'hg update' to get a working copy) |
| 69 |
$ hg update |
| 70 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 71 |
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob) |
| 72 |
$ cat foo |
| 73 |
x |
| 74 |
a |
| 75 |
$ cat bar |
| 76 |
y |
| 77 |
b |
| 78 |
|
| 79 |
$ cd .. |