| 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 |
$ echo y >> x |
| 14 |
$ hg commit -qAm y |
| 15 |
$ echo z >> x |
| 16 |
$ hg commit -qAm z |
| 17 |
$ hg update 1 |
| 18 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 19 |
$ echo w >> x |
| 20 |
$ hg commit -qAm w |
| 21 |
|
| 22 |
$ cd .. |
| 23 |
|
| 24 |
Shallow clone and activate getflogheads testing extension |
| 25 |
|
| 26 |
$ hgcloneshallow ssh://user@dummy/master shallow --noupdate |
| 27 |
streaming all changes |
| 28 |
3 files to transfer, 908 bytes of data (no-rust !) |
| 29 |
stream-cloned 3 files / 908 bytes in * seconds (*/sec) (glob) (no-rust !) |
| 30 |
5 files to transfer, 1.01 KB of data (rust !) |
| 31 |
stream-cloned 5 files / 1.01 KB in * seconds (* */sec) (glob) (rust !) |
| 32 |
searching for changes |
| 33 |
no changes found |
| 34 |
$ cd shallow |
| 35 |
|
| 36 |
$ cat >> .hg/hgrc <<EOF |
| 37 |
> [extensions] |
| 38 |
> getflogheads=$TESTDIR/remotefilelog-getflogheads.py |
| 39 |
> EOF |
| 40 |
|
| 41 |
Get heads of a remotefilelog |
| 42 |
|
| 43 |
$ hg getflogheads x |
| 44 |
2797809ca5e9c2f307d82b1345e832f655fb99a2 |
| 45 |
ca758b402ddc91e37e3113e1a97791b537e1b7bb |
| 46 |
|
| 47 |
Get heads of a non-existing remotefilelog |
| 48 |
|
| 49 |
$ hg getflogheads y |
| 50 |
EMPTY |