Mercurial > hg
annotate hgext/bookflow.py @ 49777:e1953a34c110
bundle: emit full snapshot as is, without doing a redelta
With the new `forced` delta-reused policy, it become important to be able to
send full snapshot where full snapshot are needed. Otherwise, the fallback delta
will simply be used on the client sideā¦ creating monstrous delta chain, since
revision that are meant as a reset of delta-chain chain becoming too complex are
simply adding a new full delta-tree on the leaf of another one.
In the `non-forced` cases, client process full snapshot from the bundle
differently from deltas, so client will still try to convert the full snapshot
into a delta if possible. So this will no lead to pathological storage
explosion.
I have considered making this configurable, but the impact seems limited enough
that it does not seems to be worth it. Especially with the current
sparse-revlog format that use "delta-tree" with multiple level snapshots, full
snapshot are much less frequent and not that different from other intermediate
snapshot that we are already sending over the wire anyway.
CPU wise, this will help the bundling side a little as it will not need to
reconstruct revisions and compute deltas. The unbundling side might save a tiny
amount of CPU as it won't need to reconstruct the delta-base to reconstruct the
revision full text. This only slightly visible in some of the benchmarks. And
have no real impact on most of them.
### data-env-vars.name = pypy-2018-08-01-zstd-sparse-revlog
# benchmark.name = perf-bundle
# benchmark.variants.revs = last-40000
before: 11.467186 seconds
just-emit-full: 11.190576 seconds (-2.41%)
with-pull-force: 11.041091 seconds (-3.72%)
# benchmark.name = perf-unbundle
# benchmark.variants.revs = last-40000
before: 16.744862
just-emit-full:: 16.561036 seconds (-1.10%)
with-pull-force: 16.389344 seconds (-2.12%)
# benchmark.name = pull
# benchmark.variants.revs = last-40000
before: 26.870569
just-emit-full: 26.391188 seconds (-1.78%)
with-pull-force: 25.633184 seconds (-4.60%)
Space wise (so network-wise) the impact is fairly small. When taking compression into
account.
Below are tests the size of `hg bundle --all` for a handful of benchmark repositories
(with bzip, zstd compression and without it)
This show a small increase in the bundle size, but nothing really significant
except maybe for mozilla-try (+12%) that nobody really pulls large chunk of anyway.
Mozilla-try is also the repository that benefit the most for not having to
recompute deltas client size.
### mercurial:
bzip-before: 26 406 342 bytes
bzip-after: 26 691 543 bytes +1.08%
zstd-before: 27 918 645 bytes
zstd-after: 28 075 896 bytes +0.56%
none-before: 98 675 601 bytes
none-after: 100 411 237 bytes +1.76%
### pypy
bzip-before: 201 295 752 bytes
bzip-after: 209 780 282 bytes +4.21%
zstd-before: 202 974 795 bytes
zstd-after: 205 165 780 bytes +1.08%
none-before: 871 070 261 bytes
none-after: 993 595 057 bytes +14.07%
### netbeans
bzip-before: 601 314 330 bytes
bzip-after: 614 246 241 bytes +2.15%
zstd-before: 604 745 136 bytes
zstd-after: 615 497 705 bytes +1.78%
none-before: 3 338 238 571 bytes
none-after: 3 439 422 535 bytes +3.03%
### mozilla-central
bzip-before: 1 493 006 921 bytes
bzip-after: 1 549 650 570 bytes +3.79%
zstd-before: 1 481 910 102 bytes
zstd-after: 1 513 052 415 bytes +2.10%
none-before: 6 535 929 910 bytes
none-after: 7 010 191 342 bytes +7.26%
### mozilla-try
bzip-before: 6 583 425 999 bytes
bzip-after: 7 423 536 928 bytes +12.76%
zstd-before: 6 021 009 212 bytes
zstd-after: 6 674 922 420 bytes +10.86%
none-before: 22 954 739 558 bytes
none-after: 26 013 854 771 bytes +13.32%
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 07 Dec 2022 20:12:23 +0100 |
parents | 6000f5b25c9b |
children | 3c8a31be81df |
rev | line source |
---|---|
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
1 """implements bookmark-based branching (EXPERIMENTAL) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
2 |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
3 - Disables creation of new branches (config: enable_branches=False). |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
4 - Requires an active bookmark on commit (config: require_bookmark=True). |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
5 - Doesn't move the active bookmark on update, only on commit. |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
6 - Requires '--rev' for moving an existing bookmark. |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
7 - Protects special bookmarks (config: protect=@). |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
8 |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
9 flow related commands |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
10 |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
11 :hg book NAME: create a new bookmark |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
12 :hg book NAME -r REV: move bookmark to revision (fast-forward) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
13 :hg up|co NAME: switch to bookmark |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
14 :hg push -B .: push active bookmark |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
15 """ |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
16 |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
17 from mercurial.i18n import _ |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
18 from mercurial import ( |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
19 bookmarks, |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
20 commands, |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
21 error, |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
22 extensions, |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
23 registrar, |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
24 ) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
25 |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
26 MY_NAME = b'bookflow' |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
27 |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
28 configtable = {} |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
29 configitem = registrar.configitem(configtable) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
30 |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
31 configitem(MY_NAME, b'protect', [b'@']) |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
32 configitem(MY_NAME, b'require-bookmark', True) |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
33 configitem(MY_NAME, b'enable-branches', False) |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
34 |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
35 cmdtable = {} |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
36 command = registrar.command(cmdtable) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
37 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
38 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
39 def commit_hook(ui, repo, **kwargs): |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
40 active = repo._bookmarks.active |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
41 if active: |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
42 if active in ui.configlist(MY_NAME, b'protect'): |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
43 raise error.Abort( |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
44 _(b'cannot commit, bookmark %s is protected') % active |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
45 ) |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
46 if not cwd_at_bookmark(repo, active): |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
47 raise error.Abort( |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
48 _( |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
49 b'cannot commit, working directory out of sync with active bookmark' |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
50 ), |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
51 hint=_(b"run 'hg up %s'") % active, |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
52 ) |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
53 elif ui.configbool(MY_NAME, b'require-bookmark', True): |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
54 raise error.Abort(_(b'cannot commit without an active bookmark')) |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
55 return 0 |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
56 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
57 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
58 def bookmarks_update(orig, repo, parents, node): |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
59 if len(parents) == 2: |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
60 # called during commit |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
61 return orig(repo, parents, node) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
62 else: |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
63 # called during update |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
64 return False |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
65 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
66 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
67 def bookmarks_addbookmarks( |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
68 orig, repo, tr, names, rev=None, force=False, inactive=False |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
69 ): |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
70 if not rev: |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
71 marks = repo._bookmarks |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
72 for name in names: |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
73 if name in marks: |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
74 raise error.Abort( |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
75 _( |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
76 b"bookmark %s already exists, to move use the --rev option" |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
77 ) |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
78 % name |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
79 ) |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
80 return orig(repo, tr, names, rev, force, inactive) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
81 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
82 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
83 def commands_commit(orig, ui, repo, *args, **opts): |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
84 commit_hook(ui, repo) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
85 return orig(ui, repo, *args, **opts) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
86 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
87 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
88 def commands_pull(orig, ui, repo, *args, **opts): |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
89 rc = orig(ui, repo, *args, **opts) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
90 active = repo._bookmarks.active |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
91 if active and not cwd_at_bookmark(repo, active): |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
92 ui.warn( |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
93 _( |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
94 b"working directory out of sync with active bookmark, run " |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
95 b"'hg up %s'" |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
96 ) |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
97 % active |
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
98 ) |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
99 return rc |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
100 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
101 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
102 def commands_branch(orig, ui, repo, label=None, **opts): |
43506
9f70512ae2cf
cleanup: remove pointless r-prefixes on single-quoted strings
Augie Fackler <augie@google.com>
parents:
43077
diff
changeset
|
103 if label and not opts.get('clean') and not opts.get('rev'): |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
104 raise error.Abort( |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
105 _( |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
106 b"creating named branches is disabled and you should use bookmarks" |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
107 ), |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
108 hint=b"see 'hg help bookflow'", |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
109 ) |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
110 return orig(ui, repo, label, **opts) |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
111 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
112 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
113 def cwd_at_bookmark(repo, mark): |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
114 mark_id = repo._bookmarks[mark] |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
115 cur_id = repo.lookup(b'.') |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
116 return cur_id == mark_id |
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
117 |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
41031
diff
changeset
|
118 |
40834
9cec7a36bab8
bookflow: new extension for bookmark-based branching
idlsoft <idlsoft@gmail.com>
parents:
diff
changeset
|
119 def uisetup(ui): |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
120 extensions.wrapfunction(bookmarks, b'update', bookmarks_update) |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
121 extensions.wrapfunction(bookmarks, b'addbookmarks', bookmarks_addbookmarks) |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
122 extensions.wrapcommand(commands.table, b'commit', commands_commit) |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
123 extensions.wrapcommand(commands.table, b'pull', commands_pull) |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
124 if not ui.configbool(MY_NAME, b'enable-branches'): |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
125 extensions.wrapcommand(commands.table, b'branch', commands_branch) |