changeset 38669:b5891bf8ab13

copies: delete now-unnecessary check for "a == b" before "a.descendant(b)" Unnecessary since 879cbdde63df (revlog: do inclusive descendant testing (API), 2018-06-21). Differential Revision: https://phab.mercurial-scm.org/D3935
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 12 Jul 2018 09:25:02 -0700
parents 21846c94e605
children fbec9c0b32d3
files mercurial/copies.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/copies.py	Thu Jul 12 08:14:21 2018 -0700
+++ b/mercurial/copies.py	Thu Jul 12 09:25:02 2018 -0700
@@ -416,14 +416,14 @@
     # common ancestor or not without explicitly checking it, it's better to
     # determine that here.
     #
-    # base.descendant(wc) and base.descendant(base) are False, work around that
+    # base.descendant(wc) is False, work around that
     _c1 = c1.p1() if c1.rev() is None else c1
     _c2 = c2.p1() if c2.rev() is None else c2
     # an endpoint is "dirty" if it isn't a descendant of the merge base
     # if we have a dirty endpoint, we need to trigger graft logic, and also
     # keep track of which endpoint is dirty
-    dirtyc1 = not (base == _c1 or base.descendant(_c1))
-    dirtyc2 = not (base == _c2 or base.descendant(_c2))
+    dirtyc1 = not base.descendant(_c1)
+    dirtyc2 = not base.descendant(_c2)
     graft = dirtyc1 or dirtyc2
     tca = base
     if graft: