mercurial/crecord.py
branchstable
changeset 38333 03350f5234a4
parent 37084 f0b6fbea00cf
child 38426 00368bc0a614
--- a/mercurial/crecord.py	Wed Jun 13 10:41:20 2018 -0400
+++ b/mercurial/crecord.py	Thu Jun 14 14:04:26 2018 -0700
@@ -398,7 +398,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' % (