Mercurial > hg
comparison mercurial/hgweb/webcommands.py @ 32904:582080a4a812
dagop: move blockancestors() and blockdescendants() from context
context.py seems not a good place to host these functions.
% wc -l mercurial/context.py mercurial/dagop.py
2306 mercurial/context.py
424 mercurial/dagop.py
2730 total
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 19 Feb 2017 19:37:14 +0900 |
parents | 1b90036f42f0 |
children | 1c97df5e3b46 |
comparison
equal
deleted
inserted
replaced
32903:27932a76a88d | 32904:582080a4a812 |
---|---|
26 staticfile, | 26 staticfile, |
27 ) | 27 ) |
28 | 28 |
29 from .. import ( | 29 from .. import ( |
30 archival, | 30 archival, |
31 context, | 31 dagop, |
32 encoding, | 32 encoding, |
33 error, | 33 error, |
34 graphmod, | 34 graphmod, |
35 revset, | 35 revset, |
36 revsetlang, | 36 revsetlang, |
1011 linerange = webutil.formatlinerange(*lrange) | 1011 linerange = webutil.formatlinerange(*lrange) |
1012 # deactivate numeric nav links when linerange is specified as this | 1012 # deactivate numeric nav links when linerange is specified as this |
1013 # would required a dedicated "revnav" class | 1013 # would required a dedicated "revnav" class |
1014 nav = None | 1014 nav = None |
1015 if descend: | 1015 if descend: |
1016 it = context.blockdescendants(fctx, *lrange) | 1016 it = dagop.blockdescendants(fctx, *lrange) |
1017 else: | 1017 else: |
1018 it = context.blockancestors(fctx, *lrange) | 1018 it = dagop.blockancestors(fctx, *lrange) |
1019 for i, (c, lr) in enumerate(it, 1): | 1019 for i, (c, lr) in enumerate(it, 1): |
1020 diffs = None | 1020 diffs = None |
1021 if patch: | 1021 if patch: |
1022 diffs = diff(c, linerange=lr) | 1022 diffs = diff(c, linerange=lr) |
1023 # follow renames accross filtered (not in range) revisions | 1023 # follow renames accross filtered (not in range) revisions |