Show More
@@ -972,8 +972,16 b' def reposetup(ui, repo):' | |||
|
972 | 972 | targets = repo.ui.configlist( |
|
973 | 973 | b'clone-bundles', b'auto-generate.formats' |
|
974 | 974 | ) |
|
975 |
if enabled |
|
|
976 | tr.addpostclose(CAT_POSTCLOSE, make_auto_bundler(self)) | |
|
975 | if enabled: | |
|
976 | if not targets: | |
|
977 | repo.ui.warn( | |
|
978 | _( | |
|
979 | b'clone-bundle auto-generate enabled, ' | |
|
980 | b'but no formats specified: disabling generation\n' | |
|
981 | ) | |
|
982 | ) | |
|
983 | else: | |
|
984 | tr.addpostclose(CAT_POSTCLOSE, make_auto_bundler(self)) | |
|
977 | 985 | return tr |
|
978 | 986 | |
|
979 | 987 | @localrepo.unfilteredmethod |
@@ -10,7 +10,6 b' initial setup' | |||
|
10 | 10 | > |
|
11 | 11 | > [clone-bundles] |
|
12 | 12 | > auto-generate.on-change = yes |
|
13 | > auto-generate.formats = v2 | |
|
14 | 13 | > upload-command = cp "\$HGCB_BUNDLE_PATH" "$TESTTMP"/final-upload/ |
|
15 | 14 | > delete-command = rm -f "$TESTTMP/final-upload/\$HGCB_BASENAME" |
|
16 | 15 | > url-template = file://$TESTTMP/final-upload/{basename} |
@@ -25,9 +24,36 b' initial setup' | |||
|
25 | 24 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
26 | 25 | $ cd client |
|
27 | 26 | |
|
27 | Test bundles are not generated if formats are not given | |
|
28 | ======================================================= | |
|
29 | ||
|
30 | $ touch noformats | |
|
31 | $ hg -q commit -A -m 'add noformats' | |
|
32 | $ hg push | |
|
33 | pushing to $TESTTMP/server | |
|
34 | searching for changes | |
|
35 | clone-bundle auto-generate enabled, but no formats specified: disabling generation | |
|
36 | adding changesets | |
|
37 | adding manifests | |
|
38 | adding file changes | |
|
39 | added 1 changesets with 1 changes to 1 files | |
|
40 | $ test -f ../server/.hg/clonebundles.manifest | |
|
41 | [1] | |
|
42 | $ hg debugstrip -r tip | |
|
43 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
44 | saved backup bundle to $TESTTMP/client/.hg/strip-backup/4823cdad4f38-4b2c3b65-backup.hg | |
|
45 | $ hg --cwd ../server debugstrip -r tip | |
|
46 | saved backup bundle to $TESTTMP/server/.hg/strip-backup/4823cdad4f38-4b2c3b65-backup.hg | |
|
47 | clone-bundle auto-generate enabled, but no formats specified: disabling generation | |
|
48 | clone-bundle auto-generate enabled, but no formats specified: disabling generation | |
|
49 | ||
|
28 | 50 | Test bundles are generated on push |
|
29 | 51 | ================================== |
|
30 | 52 | |
|
53 | $ cat >> ../server/.hg/hgrc << EOF | |
|
54 | > [clone-bundles] | |
|
55 | > auto-generate.formats = v2 | |
|
56 | > EOF | |
|
31 | 57 | $ touch foo |
|
32 | 58 | $ hg -q commit -A -m 'add foo' |
|
33 | 59 | $ touch bar |
General Comments 0
You need to be logged in to leave comments.
Login now