Show More
@@ -31,7 +31,6 b' from .. import (' | |||||
31 | encoding, |
|
31 | encoding, | |
32 | error, |
|
32 | error, | |
33 | graphmod, |
|
33 | graphmod, | |
34 | patch, |
|
|||
35 | revset, |
|
34 | revset, | |
36 | scmutil, |
|
35 | scmutil, | |
37 | templatefilters, |
|
36 | templatefilters, | |
@@ -861,8 +860,6 b' def annotate(web, req, tmpl):' | |||||
861 | fctx = webutil.filectx(web.repo, req) |
|
860 | fctx = webutil.filectx(web.repo, req) | |
862 | f = fctx.path() |
|
861 | f = fctx.path() | |
863 | parity = paritygen(web.stripecount) |
|
862 | parity = paritygen(web.stripecount) | |
864 | diffopts = patch.difffeatureopts(web.repo.ui, untrusted=True, |
|
|||
865 | section='annotate', whitespace=True) |
|
|||
866 |
|
863 | |||
867 | def parents(f): |
|
864 | def parents(f): | |
868 | for p in f.parents(): |
|
865 | for p in f.parents(): | |
@@ -877,8 +874,8 b' def annotate(web, req, tmpl):' | |||||
877 | or 'application/octet-stream') |
|
874 | or 'application/octet-stream') | |
878 | lines = [((fctx.filectx(fctx.filerev()), 1), '(binary:%s)' % mt)] |
|
875 | lines = [((fctx.filectx(fctx.filerev()), 1), '(binary:%s)' % mt)] | |
879 | else: |
|
876 | else: | |
880 | lines = fctx.annotate(follow=True, linenumber=True, |
|
877 | lines = webutil.annotate(fctx, web.repo.ui) | |
881 | diffopts=diffopts) |
|
878 | ||
882 | previousrev = None |
|
879 | previousrev = None | |
883 | blockparitygen = paritygen(1) |
|
880 | blockparitygen = paritygen(1) | |
884 | for lineno, ((f, targetline), l) in enumerate(lines): |
|
881 | for lineno, ((f, targetline), l) in enumerate(lines): |
@@ -164,6 +164,11 b' class _siblings(object):' | |||||
164 | def __len__(self): |
|
164 | def __len__(self): | |
165 | return len(self.siblings) |
|
165 | return len(self.siblings) | |
166 |
|
166 | |||
|
167 | def annotate(fctx, ui): | |||
|
168 | diffopts = patch.difffeatureopts(ui, untrusted=True, | |||
|
169 | section='annotate', whitespace=True) | |||
|
170 | return fctx.annotate(follow=True, linenumber=True, diffopts=diffopts) | |||
|
171 | ||||
167 | def parents(ctx, hide=None): |
|
172 | def parents(ctx, hide=None): | |
168 | if isinstance(ctx, context.basefilectx): |
|
173 | if isinstance(ctx, context.basefilectx): | |
169 | introrev = ctx.introrev() |
|
174 | introrev = ctx.introrev() |
General Comments 0
You need to be logged in to leave comments.
Login now