Debian Codegraph @

tests/test-remotefilelog-bundles.t

raw
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
18 $ cd ..
19
20 $ hgcloneshallow ssh://user@dummy/master shallow -q
21 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
22 $ cd shallow
23
24 Unbundling a shallow bundle
25
26 $ hg strip -r 66ee28d0328c
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg (glob)
29 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
30 $ hg unbundle .hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg
31 adding changesets
32 adding manifests
33 adding file changes
34 added 2 changesets with 2 changes to 1 files
35 new changesets 66ee28d0328c:16db62c5946f
36 (run 'hg update' to get a working copy)
37
38 Unbundling a full bundle
39
40 $ hg -R ../master bundle -r 66ee28d0328c:: --base "66ee28d0328c^" ../fullbundle.hg
41 2 changesets found
42 $ hg strip -r 66ee28d0328c
43 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg (glob)
44 $ hg unbundle ../fullbundle.hg
45 adding changesets
46 adding manifests
47 adding file changes
48 added 2 changesets with 2 changes to 1 files
49 new changesets 66ee28d0328c:16db62c5946f (2 drafts)
50 (run 'hg update' to get a working copy)
51
52 Pulling from a shallow bundle
53
54 $ hg strip -r 66ee28d0328c --config remotefilelog.strip.includefiles=none
55 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg (glob)
56 $ hg pull -r 66ee28d0328c .hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg
57 pulling from .hg/strip-backup/66ee28d0328c-3d7aafd1-backup.hg
58 searching for changes
59 adding changesets
60 adding manifests
61 adding file changes
62 added 1 changesets with 0 changes to 0 files
63 new changesets 66ee28d0328c (1 drafts)
64 (run 'hg update' to get a working copy)
65
66 Pulling from a full bundle, also testing that strip produces a full bundle by
67 default.
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 .hg/strip-backup/66ee28d0328c-b6ee89e7-backup.hg
72 pulling from .hg/strip-backup/66ee28d0328c-b6ee89e7-backup.hg
73 searching for changes
74 abort: cannot pull from full bundles
75 (use `hg unbundle` instead)
76 [255]