mercurial/crecord.py
branchstable
changeset 37875 03350f5234a4
parent 37087 f0b6fbea00cf
child 38431 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' % (