1220 base = self.introfilectx() |
1220 base = self.introfilectx() |
1221 if getattr(base, '_ancestrycontext', None) is None: |
1221 if getattr(base, '_ancestrycontext', None) is None: |
1222 # it is safe to use an unfiltered repository here because we are |
1222 # it is safe to use an unfiltered repository here because we are |
1223 # walking ancestors only. |
1223 # walking ancestors only. |
1224 cl = self._repo.unfiltered().changelog |
1224 cl = self._repo.unfiltered().changelog |
1225 if base.rev() is None: |
1225 # use self.rev(), not base.rev(), because if self is a merge we should still |
|
1226 # consider linkrevs in the other branch as ancestors. |
|
1227 if self.rev() is None: |
1226 # wctx is not inclusive, but works because _ancestrycontext |
1228 # wctx is not inclusive, but works because _ancestrycontext |
1227 # is used to test filelog revisions |
1229 # is used to test filelog revisions |
1228 ac = cl.ancestors( |
1230 ac = cl.ancestors( |
1229 [p.rev() for p in base.parents()], inclusive=True |
1231 [p.rev() for p in self.parents()], inclusive=True |
1230 ) |
1232 ) |
1231 else: |
1233 else: |
1232 ac = cl.ancestors([base.rev()], inclusive=True) |
1234 ac = cl.ancestors([self.rev()], inclusive=True) |
1233 base._ancestrycontext = ac |
1235 base._ancestrycontext = ac |
1234 |
1236 |
1235 return dagop.annotate( |
1237 return dagop.annotate( |
1236 base, parents, skiprevs=skiprevs, diffopts=diffopts |
1238 base, parents, skiprevs=skiprevs, diffopts=diffopts |
1237 ) |
1239 ) |