equal
deleted
inserted
replaced
540 fileid = self.filenode(path) |
540 fileid = self.filenode(path) |
541 return filectx(self._repo, path, fileid=fileid, |
541 return filectx(self._repo, path, fileid=fileid, |
542 changectx=self, filelog=filelog) |
542 changectx=self, filelog=filelog) |
543 |
543 |
544 def ancestor(self, c2, warn=False): |
544 def ancestor(self, c2, warn=False): |
545 """ |
545 """return the "best" ancestor context of self and c2 |
546 return the "best" ancestor context of self and c2 |
546 |
547 """ |
547 If there are multiple candidates, it will show a message and check |
|
548 merge.preferancestor configuration before falling back to the |
|
549 revlog ancestor.""" |
548 # deal with workingctxs |
550 # deal with workingctxs |
549 n2 = c2._node |
551 n2 = c2._node |
550 if n2 is None: |
552 if n2 is None: |
551 n2 = c2._parents[0]._node |
553 n2 = c2._parents[0]._node |
552 cahs = self._repo.changelog.commonancestorsheads(self._node, n2) |
554 cahs = self._repo.changelog.commonancestorsheads(self._node, n2) |
1144 return self._flagfunc(path) |
1146 return self._flagfunc(path) |
1145 except OSError: |
1147 except OSError: |
1146 return '' |
1148 return '' |
1147 |
1149 |
1148 def ancestor(self, c2): |
1150 def ancestor(self, c2): |
1149 """return the ancestor context of self and c2""" |
1151 """return the "best" ancestor context of self and c2""" |
1150 return self._parents[0].ancestor(c2) # punt on two parents for now |
1152 return self._parents[0].ancestor(c2) # punt on two parents for now |
1151 |
1153 |
1152 def walk(self, match): |
1154 def walk(self, match): |
1153 return sorted(self._repo.dirstate.walk(match, sorted(self.substate), |
1155 return sorted(self._repo.dirstate.walk(match, sorted(self.substate), |
1154 True, False)) |
1156 True, False)) |