Show More
@@ -542,9 +542,11 b' class changectx(basectx):' | |||||
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: | |
@@ -1146,7 +1148,7 b' class committablectx(basectx):' | |||||
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): |
@@ -753,7 +753,7 b' class revlog(object):' | |||||
753 | return a in self.commonancestorsheads(a, b) |
|
753 | return a in self.commonancestorsheads(a, b) | |
754 |
|
754 | |||
755 | def ancestor(self, a, b): |
|
755 | def ancestor(self, a, b): | |
756 |
"""calculate the |
|
756 | """calculate the "best" common ancestor of nodes a and b""" | |
757 |
|
757 | |||
758 | a, b = self.rev(a), self.rev(b) |
|
758 | a, b = self.rev(a), self.rev(b) | |
759 | try: |
|
759 | try: |
@@ -97,8 +97,7 b' Should fail because merge with other bra' | |||||
97 |
|
97 | |||
98 |
|
98 | |||
99 | Test for issue2043: ensure that 'merge -P' shows ancestors of 6 that |
|
99 | Test for issue2043: ensure that 'merge -P' shows ancestors of 6 that | |
100 |
are not ancestors of 7, regardless of where their |
|
100 | are not ancestors of 7, regardless of where their common ancestors are. | |
101 | ancestor is. |
|
|||
102 |
|
101 | |||
103 | Merge preview not affected by common ancestor: |
|
102 | Merge preview not affected by common ancestor: | |
104 |
|
103 |
General Comments 0
You need to be logged in to leave comments.
Login now