Show More
@@ -15,12 +15,12 b' from mercurial import (' | |||||
15 | manifest, |
|
15 | manifest, | |
16 | mdiff, |
|
16 | mdiff, | |
17 | node, |
|
17 | node, | |
|
18 | revlog, | |||
18 | util, |
|
19 | util, | |
19 | ) |
|
20 | ) | |
20 |
|
21 | |||
21 | from . import ( |
|
22 | from . import ( | |
22 | narrowrepo, |
|
23 | narrowrepo, | |
23 | narrowrevlog, |
|
|||
24 | ) |
|
24 | ) | |
25 |
|
25 | |||
26 | def setup(): |
|
26 | def setup(): | |
@@ -83,11 +83,11 b' def setup():' | |||||
83 | extensions.wrapfunction( |
|
83 | extensions.wrapfunction( | |
84 | changegroup.cg1packer, 'generatefiles', generatefiles) |
|
84 | changegroup.cg1packer, 'generatefiles', generatefiles) | |
85 |
|
85 | |||
86 | def ellipsisdata(packer, rev, revlog, p1, p2, data, linknode): |
|
86 | def ellipsisdata(packer, rev, revlog_, p1, p2, data, linknode): | |
87 | n = revlog.node(rev) |
|
87 | n = revlog_.node(rev) | |
88 | p1n, p2n = revlog.node(p1), revlog.node(p2) |
|
88 | p1n, p2n = revlog_.node(p1), revlog_.node(p2) | |
89 | flags = revlog.flags(rev) |
|
89 | flags = revlog_.flags(rev) | |
90 |
flags |= |
|
90 | flags |= revlog.REVIDX_ELLIPSIS | |
91 | meta = packer.builddeltaheader( |
|
91 | meta = packer.builddeltaheader( | |
92 | n, p1n, p2n, node.nullid, linknode, flags) |
|
92 | n, p1n, p2n, node.nullid, linknode, flags) | |
93 | # TODO: try and actually send deltas for ellipsis data blocks |
|
93 | # TODO: try and actually send deltas for ellipsis data blocks |
@@ -13,11 +13,6 b' from mercurial import (' | |||||
13 | util, |
|
13 | util, | |
14 | ) |
|
14 | ) | |
15 |
|
15 | |||
16 | ELLIPSIS_NODE_FLAG = 1 << 14 |
|
|||
17 | revlog.REVIDX_KNOWN_FLAGS |= ELLIPSIS_NODE_FLAG |
|
|||
18 | if ELLIPSIS_NODE_FLAG not in revlog.REVIDX_FLAGS_ORDER: |
|
|||
19 | revlog.REVIDX_FLAGS_ORDER.append(ELLIPSIS_NODE_FLAG) |
|
|||
20 |
|
||||
21 | def readtransform(self, text): |
|
16 | def readtransform(self, text): | |
22 | return text, False |
|
17 | return text, False | |
23 |
|
18 | |||
@@ -27,7 +22,7 b' def writetransform(self, text):' | |||||
27 | def rawtransform(self, text): |
|
22 | def rawtransform(self, text): | |
28 | return False |
|
23 | return False | |
29 |
|
24 | |||
30 |
revlog.addflagprocessor(ELLIPSIS |
|
25 | revlog.addflagprocessor(revlog.REVIDX_ELLIPSIS, | |
31 | (readtransform, writetransform, rawtransform)) |
|
26 | (readtransform, writetransform, rawtransform)) | |
32 |
|
27 | |||
33 | def setup(): |
|
28 | def setup(): |
@@ -8,15 +8,14 b'' | |||||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | from mercurial import ( |
|
10 | from mercurial import ( | |
|
11 | revlog, | |||
11 | revset, |
|
12 | revset, | |
12 | templatekw, |
|
13 | templatekw, | |
13 | util, |
|
14 | util, | |
14 | ) |
|
15 | ) | |
15 |
|
16 | |||
16 | from . import narrowrevlog |
|
|||
17 |
|
||||
18 | def _isellipsis(repo, rev): |
|
17 | def _isellipsis(repo, rev): | |
19 |
if repo.changelog.flags(rev) & |
|
18 | if repo.changelog.flags(rev) & revlog.REVIDX_ELLIPSIS: | |
20 | return True |
|
19 | return True | |
21 | return False |
|
20 | return False | |
22 |
|
21 |
General Comments 0
You need to be logged in to leave comments.
Login now