comparison mercurial/context.py @ 23616:11a160547d7f

context: return dirstate parents in workingctx.ancestors() workingctx.ancestors() was not returning the dirstate parents as part of the result set. The only place this function is used is for copy detection when committing a file, and that code already checks the parents manually, so this change has no affect at the moment. I found it while playing around with changing how copy detection works.
author Durham Goode <durham@fb.com>
date Thu, 18 Dec 2014 09:37:14 -0800
parents d74eb8d477d5
children 8f32dcfbc338
comparison
equal deleted inserted replaced
23615:7cfe58983bff 23616:11a160547d7f
1163 1163
1164 def matches(self, match): 1164 def matches(self, match):
1165 return sorted(self._repo.dirstate.matches(match)) 1165 return sorted(self._repo.dirstate.matches(match))
1166 1166
1167 def ancestors(self): 1167 def ancestors(self):
1168 for p in self._parents:
1169 yield p
1168 for a in self._repo.changelog.ancestors( 1170 for a in self._repo.changelog.ancestors(
1169 [p.rev() for p in self._parents]): 1171 [p.rev() for p in self._parents]):
1170 yield changectx(self._repo, a) 1172 yield changectx(self._repo, a)
1171 1173
1172 def markcommitted(self, node): 1174 def markcommitted(self, node):