comparison tests/test-remotefilelog-bundles.t @ 40495:3a333a582d7b

remotefilelog: import pruned-down remotefilelog extension from hg-experimental This is remotefilelog as of my recent patches for compatibility with current tip of hg, minus support for old versions of Mercurial and some FB-specific features like their treemanifest extension and fetching linkrev data from a patched phabricator. The file extutil.py moved from hgext3rd to remotefilelog. This is not yet ready to be landed, consider it a preview for now. Planned changes include: * replace lz4 with zstd * rename some capabilities, requirements and wireproto commands to mark them as experimental * consolidate bits of shallowutil with related functions (eg readfile) I'm certainly open to other (small) changes, but my rough mission is to land this largely as-is so we can use it as a model of the functionality we need going forward for lazy-fetching of file contents from a server. # no-check-commit because of a few foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D4782
author Augie Fackler <augie@google.com>
date Thu, 27 Sep 2018 13:03:19 -0400
parents
children 95a079ea1e19
comparison
equal deleted inserted replaced
40494:9aeb9e2d28a7 40495:3a333a582d7b
1 $ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
2 $ export PYTHONPATH
3
4 $ . "$TESTDIR/remotefilelog-library.sh"
5
6 $ hginit master
7 $ cd master
8 $ cat >> .hg/hgrc <<EOF
9 > [remotefilelog]
10 > server=True
11 > EOF
12 $ echo x > x
13 $ hg commit -qAm x
14 $ echo y >> x
15 $ hg commit -qAm y
16 $ echo z >> x
17 $ hg commit -qAm z
18
19 $ cd ..
20
21 $ hgcloneshallow ssh://user@dummy/master shallow -q
22 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
23 $ cd shallow
24
25 Unbundling a shallow bundle
26
27 $ hg strip -r 66ee28d0328c
28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg (glob)
30 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
31 $ hg unbundle .hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg
32 adding changesets
33 adding manifests
34 adding file changes
35 added 2 changesets with 0 changes to 0 files
36 new changesets 66ee28d0328c:16db62c5946f
37 (run 'hg update' to get a working copy)
38
39 Unbundling a full bundle
40
41 $ hg -R ../master bundle -r 66ee28d0328c:: --base "66ee28d0328c^" ../fullbundle.hg
42 2 changesets found
43 $ hg strip -r 66ee28d0328c
44 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg (glob)
45 $ hg unbundle ../fullbundle.hg
46 adding changesets
47 adding manifests
48 adding file changes
49 added 2 changesets with 2 changes to 1 files
50 new changesets 66ee28d0328c:16db62c5946f (2 drafts)
51 (run 'hg update' to get a working copy)
52
53 Pulling from a shallow bundle
54
55 $ hg strip -r 66ee28d0328c
56 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg (glob)
57 $ hg pull -r 66ee28d0328c .hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg
58 pulling from .hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg
59 searching for changes
60 adding changesets
61 adding manifests
62 adding file changes
63 added 1 changesets with 0 changes to 0 files
64 new changesets 66ee28d0328c (1 drafts)
65 (run 'hg update' to get a working copy)
66
67 Pulling from a full bundle
68
69 $ hg strip -r 66ee28d0328c
70 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/66ee28d0328c-b6ee89e7-backup.hg (glob)
71 $ hg pull -r 66ee28d0328c ../fullbundle.hg
72 pulling from ../fullbundle.hg
73 searching for changes
74 abort: cannot pull from full bundles
75 (use `hg unbundle` instead)
76 [255]