mercurial/scmutil.py
changeset 32269 ed2c44741190
parent 32172 448ed4d3ee90
child 32270 218ca8526ec0
--- a/mercurial/scmutil.py	Tue May 02 18:57:52 2017 +0200
+++ b/mercurial/scmutil.py	Thu May 11 08:39:44 2017 -0700
@@ -925,7 +925,10 @@
     def read(self):
         lines = self.vfs.readlines(self.path)
         try:
-            d = dict(line[:-1].split('=', 1) for line in lines if line)
+            # the 'if line.strip()' part prevents us from failing on empty
+            # lines which only contain '\n' therefore are not skipped
+            # by 'if line'
+            d = dict(line[:-1].split('=', 1) for line in lines if line.strip())
         except ValueError as e:
             raise error.CorruptedState(str(e))
         return d