sapling/tests/test-clone.t
Siddharth Agarwal dfac9098fe [tests] fix up for Mercurial 3.2
Summary:
- fixes for pulls after uncompressed clones
- add a glob where there should be one

Test Plan: Ran the tests with Mercurial @

Reviewers: davidsp, akushner, rmcelroy, pyd, daviser, durham

Reviewed By: durham

Differential Revision: https://phabricator.fb.com/D1668739

Signature: t1:1668739:1415643384:567a0841ef4367ee2f905f6fe5517d229d5eadcf
2014-11-07 18:17:39 -08:00

89 lines
1.9 KiB
Perl

$ . "$TESTDIR/library.sh"
$ hginit master
$ cd master
$ cat >> .hg/hgrc <<EOF
> [remotefilelog]
> server=True
> EOF
$ echo x > x
$ hg commit -qAm x
$ cd ..
# shallow clone from full
$ hgcloneshallow ssh://user@dummy/master shallow --noupdate
streaming all changes
2 files to transfer, 227 bytes of data
transferred 227 bytes in 0.0 seconds (* KB/sec) (glob)
searching for changes
no changes found
$ cd shallow
$ cat .hg/requires
dotencode
fncache
remotefilelog
revlogv1
store
$ hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
$ cat x
x
$ cd ..
# shallow clone from shallow
$ hgcloneshallow ssh://user@dummy/shallow shallow2 --noupdate
streaming all changes
2 files to transfer, 227 bytes of data
transferred 227 bytes in 0.0 seconds (* KB/sec) (glob)
searching for changes
no changes found
$ cd shallow2
$ cat .hg/requires
dotencode
fncache
remotefilelog
revlogv1
store
$ hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat x
x
$ cd ..
# full clone from shallow
$ hg clone --noupdate ssh://user@dummy/shallow full
abort: unexpected response from remote server: empty string
remote: abort: Cannot clone from a shallow repo to a full repo.
[255]
# getbundle full clone
$ printf '[server]\npreferuncompressed=False\n' >> master/.hg/hgrc
$ hgcloneshallow ssh://user@dummy/master shallow3
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 0 changes to 0 files
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ ls shallow3/.hg/store/data
$ cat shallow3/.hg/requires
dotencode
fncache
remotefilelog
revlogv1
store