changeset 36096:48b592d986e7

narrowrevlog: add what little I can remember about rename filtering Differential Revision: https://phab.mercurial-scm.org/D2188
author Augie Fackler <augie@google.com>
date Mon, 12 Feb 2018 14:12:28 -0500
parents 59adb3051718
children 66b4ffe90676
files hgext/narrow/narrowrevlog.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/narrow/narrowrevlog.py	Mon Feb 12 14:01:44 2018 -0500
+++ b/hgext/narrow/narrowrevlog.py	Mon Feb 12 14:12:28 2018 -0500
@@ -139,6 +139,12 @@
 def makenarrowfilelog(fl, narrowmatch):
     class narrowfilelog(fl.__class__):
         def renamed(self, node):
+            # Renames that come from outside the narrowspec are
+            # problematic at least for git-diffs, because we lack the
+            # base text for the rename. This logic was introduced in
+            # 3cd72b1 of narrowhg (authored by martinvonz, reviewed by
+            # adgar), but that revision doesn't have any additional
+            # commentary on what problems we can encounter.
             m = super(narrowfilelog, self).renamed(node)
             if m and not narrowmatch(m[0]):
                 return None