From patchwork Sun Feb 24 08:24:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6009: context: rewrite renamed() in terms of new copysource() where appropriate From: phabricator X-Patchwork-Id: 38894 Message-Id: <235c325fba284e14a71ba2a03b1160ad@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Sun, 24 Feb 2019 08:24:27 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGe9413a3be093: context: rewrite renamed() in terms of new copysource() where appropriate (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6009?vs=14197&id=14212 REVISION DETAIL https://phab.mercurial-scm.org/D6009 AFFECTED FILES mercurial/context.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1701,7 +1701,7 @@ def data(self): return self._repo.wread(self._path) def renamed(self): - rp = self._repo.dirstate.copied(self._path) + rp = self.copysource() if not rp: return None return rp, self._changectx._parents[0]._manifest.get(rp, nullid) @@ -2147,7 +2147,7 @@ return self._parent.exists(self._path) def renamed(self): - path = self._parent.copydata(self._path) + path = self.copysource() if not path: return None return path, self._changectx._parents[0]._manifest.get(path, nullid)