diff mercurial/logcmdutil.py @ 43811:29adf0a087a1

merge with stable
author Augie Fackler <augie@google.com>
date Thu, 05 Dec 2019 11:15:19 -0500
parents faa8a59f4a06 d1b9d2c6ec96
children 6331a6fc3304
line wrap: on
line diff
--- a/mercurial/logcmdutil.py	Tue Dec 03 17:17:57 2019 -0800
+++ b/mercurial/logcmdutil.py	Thu Dec 05 11:15:19 2019 -0500
@@ -945,6 +945,8 @@
         fctx = wctx.filectx(fname)
         for fctx, linerange in dagop.blockancestors(fctx, fromline, toline):
             rev = fctx.introrev()
+            if rev is None:
+                rev = wdirrev
             if rev not in userrevs:
                 continue
             linerangesbyrev.setdefault(rev, {}).setdefault(
@@ -955,7 +957,7 @@
         return hunks
 
     def hunksfilter(ctx):
-        fctxlineranges = linerangesbyrev.get(ctx.rev())
+        fctxlineranges = linerangesbyrev.get(scmutil.intrev(ctx))
         if fctxlineranges is None:
             return nofilterhunksfn
 
@@ -975,7 +977,7 @@
         return filterfn
 
     def filematcher(ctx):
-        files = list(linerangesbyrev.get(ctx.rev(), []))
+        files = list(linerangesbyrev.get(scmutil.intrev(ctx), []))
         return scmutil.matchfiles(repo, files)
 
     revs = sorted(linerangesbyrev, reverse=True)