tests/test-clonebundles-autogen.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 13 Mar 2023 19:16:19 +0100
changeset 50435 23db5f15cc0c
parent 50434 65fb4cedd5ea
child 50436 a53b8ddf8f3f
permissions -rw-r--r--
clone-bundles: introduce a command to refresh bundle This command allows for a different mode than the one attached to the transation. It might fit some hosting setup better.
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"