tests/test-clonebundles-autogen.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 02 Feb 2023 17:35:38 +0100
changeset 50599 921a72735482
parent 50438 3973b1dc3ee3
child 50710 1299525832d0
permissions -rw-r--r--
safehasattr: pass attribute name as string instead of bytes This is a step toward replacing `util.safehasattr` usage with plain `hasattr`. The builtin function behave poorly in Python2 but this was fixed in Python3. These change are done one by one as they tend to have a small odd to trigger puzzling breackage.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50430
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]
50434
65fb4cedd5ea clone-bundles: add a configuration to control auto-generation on changes
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50433
diff changeset
    12
  > auto-generate.on-change = yes
50430
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
  > 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
    14
  > upload-command = cp "\$HGCB_BUNDLE_PATH" "$TESTTMP"/final-upload/
50431
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    15
  > delete-command = rm -f "$TESTTMP/final-upload/\$HGCB_BASENAME"
50430
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
  > 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
    17
  > 
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
  > [devel]
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
  > 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
    20
  > EOF
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    21
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
  $ 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
    23
  $ 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
    24
  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
    25
  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
    26
  $ 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
    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
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
    29
==================================
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    30
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 foo
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 foo'
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
  $ 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
    34
  $ 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
    35
  $ 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
    36
  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
    37
  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
    38
  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
    39
  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
    40
  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
    41
  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
    42
  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
    43
  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
    44
  $ 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
    45
  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
    46
  $ 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
    47
  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
    48
  $ 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
    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
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
    51
--------------------------------------------
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    52
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 baz
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 baz'
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
  $ 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
    56
  $ 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
    57
  $ 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
    58
  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
    59
  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
    60
  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
    61
  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
    62
  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
    63
  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
    64
  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
    65
  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
    66
5ae30ff79c76 clone-bundles: add a basic first version of automatic bundle generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
  $ 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
    68
  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
    69
  $ 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
    70
  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
    71
  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
    72
  $ ls -1 ../server/.hg/tmp-bundles
50431
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    73
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    74
Older bundles are cleaned up with more pushes
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    75
---------------------------------------------
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    76
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    77
  $ touch faz
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    78
  $ hg -q commit -A -m 'add faz'
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    79
  $ touch fuz
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    80
  $ hg -q commit -A -m 'add fuz'
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    81
  $ hg push
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    82
  pushing to $TESTTMP/server
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    83
  searching for changes
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    84
  adding changesets
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    85
  adding manifests
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    86
  adding file changes
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    87
  clone-bundles: deleting bundle full-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg (glob)
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    88
  6 changesets found
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    89
  added 2 changesets with 2 changes to 2 files
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    90
  clone-bundles: starting bundle generation: v2
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    91
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    92
  $ cat ../server/.hg/clonebundles.manifest
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    93
  file:/*/$TESTTMP/final-upload/full-v2-6_revs-b1010e95ea00_tip-*_txn.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    94
  $ ls -1 ../final-upload
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    95
  full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob)
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    96
  full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob)
971dc2369b04 clone-bundles: garbage collect older bundle when generating new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50430
diff changeset
    97
  $ ls -1 ../server/.hg/tmp-bundles
50432
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
    98
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
    99
Test conditions to get them generated
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   100
=====================================
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   101
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   102
Check ratio
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   103
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   104
  $ cat >> ../server/.hg/hgrc << EOF
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   105
  > [clone-bundles]
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   106
  > trigger.below-bundled-ratio = 0.5
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   107
  > EOF
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   108
  $ touch far
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   109
  $ hg -q commit -A -m 'add far'
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   110
  $ hg push
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   111
  pushing to $TESTTMP/server
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   112
  searching for changes
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   113
  adding changesets
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   114
  adding manifests
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   115
  adding file changes
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   116
  added 1 changesets with 1 changes to 1 files
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   117
  $ cat ../server/.hg/clonebundles.manifest
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   118
  file:/*/$TESTTMP/final-upload/full-v2-6_revs-b1010e95ea00_tip-*_txn.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   119
  $ ls -1 ../final-upload
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   120
  full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob)
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   121
  full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob)
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   122
  $ ls -1 ../server/.hg/tmp-bundles
5b70b9f5a2f9 clone-bundles: only regenerate the clone bundle when cached ration is low
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50431
diff changeset
   123
50433
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   124
Check absolute number of revisions
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   125
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   126
  $ cat >> ../server/.hg/hgrc << EOF
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   127
  > [clone-bundles]
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   128
  > trigger.revs = 2
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   129
  > EOF
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   130
  $ touch bur
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   131
  $ hg -q commit -A -m 'add bur'
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   132
  $ hg push
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   133
  pushing to $TESTTMP/server
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   134
  searching for changes
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   135
  adding changesets
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   136
  adding manifests
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   137
  adding file changes
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   138
  clone-bundles: deleting bundle full-v2-4_revs-6427147b985a_tip-*_txn.hg (glob)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   139
  8 changesets found
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   140
  added 1 changesets with 1 changes to 1 files
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   141
  clone-bundles: starting bundle generation: v2
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   142
  $ cat ../server/.hg/clonebundles.manifest
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   143
  file:/*/$TESTTMP/final-upload/full-v2-8_revs-8353e8af1306_tip-*_txn.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   144
  $ ls -1 ../final-upload
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   145
  full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   146
  full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   147
  $ ls -1 ../server/.hg/tmp-bundles
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   148
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   149
(that one would not generate new bundles)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   150
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   151
  $ touch tur
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   152
  $ hg -q commit -A -m 'add tur'
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   153
  $ hg push
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   154
  pushing to $TESTTMP/server
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   155
  searching for changes
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   156
  adding changesets
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   157
  adding manifests
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   158
  adding file changes
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   159
  added 1 changesets with 1 changes to 1 files
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   160
  $ cat ../server/.hg/clonebundles.manifest
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   161
  file:/*/$TESTTMP/final-upload/full-v2-8_revs-8353e8af1306_tip-*_txn.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   162
  $ ls -1 ../final-upload
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   163
  full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   164
  full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob)
d611805e7374 clone-bundles: also control automation based on absolute number of revisions
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50432
diff changeset
   165
  $ ls -1 ../server/.hg/tmp-bundles
50435
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   166
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   167
Test generation through the dedicated command
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   168
=============================================
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   169
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   170
  $ cat >> ../server/.hg/hgrc << EOF
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   171
  > [clone-bundles]
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   172
  > auto-generate.on-change = no
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   173
  > EOF
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   174
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   175
Check the command can generate content when needed
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   176
--------------------------------------------------
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   177
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   178
Do a push that makes the condition fulfilled,
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   179
Yet it should not automatically generate a bundle with
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   180
"auto-generate.on-change" not set.
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   181
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   182
  $ touch quoi
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   183
  $ hg -q commit -A -m 'add quoi'
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   184
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   185
  $ pre_push_manifest=`cat ../server/.hg/clonebundles.manifest|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   186
  $ pre_push_upload=`ls -1 ../final-upload|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   187
  $ ls -1 ../server/.hg/tmp-bundles
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   188
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   189
  $ hg push
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   190
  pushing to $TESTTMP/server
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   191
  searching for changes
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   192
  adding changesets
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   193
  adding manifests
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   194
  adding file changes
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   195
  added 1 changesets with 1 changes to 1 files
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   196
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   197
  $ post_push_manifest=`cat ../server/.hg/clonebundles.manifest|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   198
  $ post_push_upload=`ls -1 ../final-upload|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   199
  $ ls -1 ../server/.hg/tmp-bundles
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   200
  $ test "$pre_push_manifest" = "$post_push_manifest"
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   201
  $ test "$pre_push_upload" = "$post_push_upload"
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   202
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   203
Running the command should detect the stale bundles, and do the full automatic
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   204
generation logic.
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   205
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   206
  $ hg -R ../server/ admin::clone-bundles-refresh
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   207
  clone-bundles: deleting bundle full-v2-6_revs-b1010e95ea00_tip-*_txn.hg (glob)
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   208
  clone-bundles: starting bundle generation: v2
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   209
  10 changesets found
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   210
  $ cat ../server/.hg/clonebundles.manifest
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   211
  file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   212
  $ ls -1 ../final-upload
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   213
  full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   214
  full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob)
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   215
  $ ls -1 ../server/.hg/tmp-bundles
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   216
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   217
Check the command cleans up older bundles when possible
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   218
-------------------------------------------------------
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   219
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   220
  $ hg -R ../server/ admin::clone-bundles-refresh
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   221
  clone-bundles: deleting bundle full-v2-8_revs-8353e8af1306_tip-*_txn.hg (glob)
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   222
  $ cat ../server/.hg/clonebundles.manifest
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   223
  file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   224
  $ ls -1 ../final-upload
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   225
  full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   226
  $ ls -1 ../server/.hg/tmp-bundles
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   227
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   228
Nothing is generated when the bundles are sufficiently up to date
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   229
-----------------------------------------------------------------
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   230
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   231
  $ touch feur
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   232
  $ hg -q commit -A -m 'add feur'
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   233
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   234
  $ pre_push_manifest=`cat ../server/.hg/clonebundles.manifest|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   235
  $ pre_push_upload=`ls -1 ../final-upload|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   236
  $ ls -1 ../server/.hg/tmp-bundles
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   237
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   238
  $ hg push
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   239
  pushing to $TESTTMP/server
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   240
  searching for changes
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   241
  adding changesets
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   242
  adding manifests
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   243
  adding file changes
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   244
  added 1 changesets with 1 changes to 1 files
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   245
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   246
  $ post_push_manifest=`cat ../server/.hg/clonebundles.manifest|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   247
  $ post_push_upload=`ls -1 ../final-upload|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   248
  $ ls -1 ../server/.hg/tmp-bundles
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   249
  $ test "$pre_push_manifest" = "$post_push_manifest"
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   250
  $ test "$pre_push_upload" = "$post_push_upload"
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   251
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   252
  $ hg -R ../server/ admin::clone-bundles-refresh
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   253
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   254
  $ post_refresh_manifest=`cat ../server/.hg/clonebundles.manifest|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   255
  $ post_refresh_upload=`ls -1 ../final-upload|f --sha256 | sed 's/.*=//' | cat`
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   256
  $ ls -1 ../server/.hg/tmp-bundles
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   257
  $ test "$pre_push_manifest" = "$post_refresh_manifest"
23db5f15cc0c clone-bundles: introduce a command to refresh bundle
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50434
diff changeset
   258
  $ test "$pre_push_upload" = "$post_refresh_upload"
50436
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   259
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   260
Test modification of configuration
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   261
==================================
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   262
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   263
Testing that later runs adapt to configuration changes even if the repository is
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   264
unchanged.
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   265
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   266
adding more formats
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   267
-------------------
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   268
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   269
bundle for added formats should be generated
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   270
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   271
change configuration
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   272
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   273
  $ cat >> ../server/.hg/hgrc << EOF
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   274
  > [clone-bundles]
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   275
  > auto-generate.formats = v1, v2
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   276
  > EOF
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   277
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   278
refresh the bundles
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   279
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   280
  $ hg -R ../server/ admin::clone-bundles-refresh
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   281
  clone-bundles: starting bundle generation: v1
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   282
  11 changesets found
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   283
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   284
the bundle for the "new" format should have been added
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   285
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   286
  $ cat ../server/.hg/clonebundles.manifest
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   287
  file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 REQUIRESNI=true (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   288
  file:/*/$TESTTMP/final-upload/full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   289
  $ ls -1 ../final-upload
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   290
  full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   291
  full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   292
  $ ls -1 ../server/.hg/tmp-bundles
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   293
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   294
Changing the ratio
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   295
------------------
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   296
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   297
Changing the ratio to something that would have triggered a bundle during the last push.
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   298
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   299
  $ cat >> ../server/.hg/hgrc << EOF
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   300
  > [clone-bundles]
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   301
  > trigger.below-bundled-ratio = 0.95
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   302
  > EOF
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   303
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   304
refresh the bundles
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   305
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   306
  $ hg -R ../server/ admin::clone-bundles-refresh
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   307
  clone-bundles: starting bundle generation: v2
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   308
  11 changesets found
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   309
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   310
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   311
the "outdated' bundle should be refreshed
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   312
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   313
  $ cat ../server/.hg/clonebundles.manifest
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   314
  file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 REQUIRESNI=true (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   315
  file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   316
  $ ls -1 ../final-upload
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   317
  full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   318
  full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   319
  full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
a53b8ddf8f3f clone-bundles: add more test cases for automatic generation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50435
diff changeset
   320
  $ ls -1 ../server/.hg/tmp-bundles
50437
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   321
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   322
Test more command options
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   323
=========================
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   324
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   325
bundle clearing
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   326
---------------
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   327
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   328
  $ hg -R ../server/ admin::clone-bundles-clear
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   329
  clone-bundles: deleting bundle full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   330
  clone-bundles: deleting bundle full-v2-10_revs-3b6f57f17d70_tip-*_acbr.hg (glob)
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   331
  clone-bundles: deleting bundle full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   332
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   333
Nothing should remain
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   334
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   335
  $ cat ../server/.hg/clonebundles.manifest
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   336
  $ ls -1 ../final-upload
10318b88b1d6 clone-bundles: add a command to clear all bundles
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50436
diff changeset
   337
  $ ls -1 ../server/.hg/tmp-bundles
50438
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   338
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   339
background generation
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   340
---------------------
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   341
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   342
generate bundle using background subprocess
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   343
(since we are in devel mode, the command will still wait for the background
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   344
process to end)
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   345
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   346
  $ hg -R ../server/ admin::clone-bundles-refresh --background
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   347
  11 changesets found
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   348
  11 changesets found
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   349
  clone-bundles: starting bundle generation: v1
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   350
  clone-bundles: starting bundle generation: v2
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   351
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   352
bundles should have been generated
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   353
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   354
  $ cat ../server/.hg/clonebundles.manifest
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   355
  file:/*/$TESTTMP/final-upload/full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v1 REQUIRESNI=true (glob)
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   356
  file:/*/$TESTTMP/final-upload/full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg BUNDLESPEC=v2 REQUIRESNI=true (glob)
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   357
  $ ls -1 ../final-upload
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   358
  full-v1-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   359
  full-v2-11_revs-4226b1cd5fda_tip-*_acbr.hg (glob)
3973b1dc3ee3 clone-bundles: add an option to generate bundles in the background
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50437
diff changeset
   360
  $ ls -1 ../server/.hg/tmp-bundles