|
1 |
|
2 #require no-reposimplestore no-chg |
|
3 |
|
4 initial setup |
|
5 |
|
6 $ hg init server |
|
7 $ cat >> server/.hg/hgrc << EOF |
|
8 > [extensions] |
|
9 > clonebundles = |
|
10 > |
|
11 > [clone-bundles] |
|
12 > auto-generate.formats = v2 |
|
13 > upload-command = cp "\$HGCB_BUNDLE_PATH" "$TESTTMP"/final-upload/ |
|
14 > url-template = file://$TESTTMP/final-upload/{basename} |
|
15 > |
|
16 > [devel] |
|
17 > debug.clonebundles=yes |
|
18 > EOF |
|
19 |
|
20 $ mkdir final-upload |
|
21 $ hg clone server client |
|
22 updating to branch default |
|
23 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 $ cd client |
|
25 |
|
26 Test bundles are generated on push |
|
27 ================================== |
|
28 |
|
29 $ touch foo |
|
30 $ hg -q commit -A -m 'add foo' |
|
31 $ touch bar |
|
32 $ hg -q commit -A -m 'add bar' |
|
33 $ hg push |
|
34 pushing to $TESTTMP/server |
|
35 searching for changes |
|
36 adding changesets |
|
37 adding manifests |
|
38 adding file changes |
|
39 2 changesets found |
|
40 added 2 changesets with 2 changes to 2 files |
|
41 clone-bundles: starting bundle generation: v2 |
|
42 $ cat ../server/.hg/clonebundles.manifest |
|
43 file:/*/$TESTTMP/final-upload/full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg BUNDLESPEC=v2 REQUIRESNI=true (glob) |
|
44 $ ls -1 ../final-upload |
|
45 full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg (glob) |
|
46 $ ls -1 ../server/.hg/tmp-bundles |
|
47 |
|
48 Newer bundles are generated with more pushes |
|
49 -------------------------------------------- |
|
50 |
|
51 $ touch baz |
|
52 $ hg -q commit -A -m 'add baz' |
|
53 $ touch buz |
|
54 $ hg -q commit -A -m 'add buz' |
|
55 $ hg push |
|
56 pushing to $TESTTMP/server |
|
57 searching for changes |
|
58 adding changesets |
|
59 adding manifests |
|
60 adding file changes |
|
61 4 changesets found |
|
62 added 2 changesets with 2 changes to 2 files |
|
63 clone-bundles: starting bundle generation: v2 |
|
64 |
|
65 $ cat ../server/.hg/clonebundles.manifest |
|
66 file:/*/$TESTTMP/final-upload/full-v2-4_revs-6427147b985a_tip-*_txn.hg BUNDLESPEC=v2 REQUIRESNI=true (glob) |
|
67 $ ls -1 ../final-upload |
|
68 full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg (glob) |
|
69 full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob) |
|
70 $ ls -1 ../server/.hg/tmp-bundles |