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