diff mercurial/crecord.py @ 38426:00368bc0a614

merge with stable
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 21 Jun 2018 09:32:31 -0700
parents 96871ca32270 03350f5234a4
children 682f73fa924a
line wrap: on
line diff
--- a/mercurial/crecord.py	Tue Jun 19 13:49:06 2018 -0700
+++ b/mercurial/crecord.py	Thu Jun 21 09:32:31 2018 -0700
@@ -403,7 +403,7 @@
         if fromline != 0:
             if fromlen == 0:
                 fromline -= 1
-            if tolen == 0:
+            if tolen == 0 and toline > 0:
                 toline -= 1
 
         fromtoline = '@@ -%d,%d +%d,%d @@%s\n' % (