comparison hgext3rd/pullbundle.py @ 4132:afc933d32085

pullbundle: add extension documentation
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 23 Sep 2018 22:45:23 +0200
parents a1f6b8211016
children 1293625d274d
comparison
equal deleted inserted replaced
4131:788798a9a159 4132:afc933d32085
2 # 2 #
3 # Copyright 2018 Pierre-Yves David <pierre-yves.david@ens-lyon.org> 3 # Copyright 2018 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7 """pullbundle: automatic server side bundle caching
8
9 General principle
10 =================
11
12 This extension provides a means for server to use pre-computed bundle for
13 serving arbitrary pulls. If missing, the necessary pre-computed bundle will be
14 generated on demand.
15
16 To maximize usage of existing cached bundle, each pull will be served through
17 multiple bundles. The bundle will be created using "standard range" from the
18 "stablerange" principle. The "stablerange" concept if already used for
19 obsmarkers discovery in the evolve extensions.
20
21 Using pull Bundle
22 =================
23
24 All configuration is only required server side.
25
26 The "stablerange" code currently still live in the evolve extensions, so for
27 now enabling that extensions is required:
28
29 You need at minimum the following configuration:
30
31 [extensions]
32 evolve=yes
33 pullbundle=yes
34 [experimental]
35 obshashrange.warm-cache = yes
36
37 If you do not want to use evolution server side, you should disable obsmarkers exchange:
38
39 [experimental]
40 evolution.exchange=no
41
42 Implementation status
43 =====================
44
45 Both for stablerange and pullbundle use "simple" initial implementations.
46 Theses implemenations focus on testing the algorithms and proving the features
47 works. Yet they are already useful and used in production.
48
49 Performances are expected to greatly improved in the final implementation,
50 especially if some of it end up being compiled.
51
52 This first implementation lacks the ability to server the cached bundle from a
53 CDN. We'll want this limitation to be lifted quickly.
54
55 Why is does this live in the same repository as evolve
56 ======================================================
57
58 There is no fundamental reasons for live in the same repository. However, the
59 stablerange data-structure lives in evolve, so it was simpler to put this new
60 extensions next to it. As soon as stable range have been upstreamed, we won't
61 need the dependency to the evolve extension anymore.
62 """
8 import errno 63 import errno
9 import os 64 import os
10 65
11 from mercurial import ( 66 from mercurial import (
12 changegroup, 67 changegroup,