D5639: context: delete mistaken comment about return value of renamed()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Mon Jan 21 21:49:19 UTC 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The comment seems to think that the return value of renamed() is a
  tuple of source pathsx in the parents, but it's actually a pair of
  (rename source path, file nodeid).

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5639

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2178,8 +2178,6 @@
     """
     def getfilectx(repo, memctx, path):
         fctx = ctx[path]
-        # this is weird but apparently we only keep track of one parent
-        # (why not only store that instead of a tuple?)
         copied = fctx.renamed()
         if copied:
             copied = copied[0]



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list