mercurial/context.py
changeset 32486 1df80eff24cf
parent 32485 05abc47f3746
child 32519 6ae068f801e3
--- a/mercurial/context.py	Wed May 24 19:07:14 2017 -0700
+++ b/mercurial/context.py	Wed May 24 19:39:33 2017 -0700
@@ -949,7 +949,8 @@
             return p[1]
         return filectx(self._repo, self._path, fileid=-1, filelog=self._filelog)
 
-    def annotate(self, follow=False, linenumber=False, diffopts=None):
+    def annotate(self, follow=False, linenumber=False, skiprevs=None,
+                 diffopts=None):
         '''returns a list of tuples of ((ctx, number), line) for each line
         in the file, where ctx is the filectx of the node where
         that line was last changed; if linenumber parameter is true, number is
@@ -1044,7 +1045,10 @@
             if ready:
                 visit.pop()
                 curr = decorate(f.data(), f)
-                curr = _annotatepair([hist[p] for p in pl], f, curr, False,
+                skipchild = False
+                if skiprevs is not None:
+                    skipchild = f._changeid in skiprevs
+                curr = _annotatepair([hist[p] for p in pl], f, curr, skipchild,
                                      diffopts)
                 for p in pl:
                     if needed[p] == 1: