changeset 39136:b892df0766e1

branchmap: strip '\n' read from cache file as before Follows up 2a4bfbb52111.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 17 Aug 2018 10:24:29 +0900
parents 485a3349d5ee
children dd1614906a20
files mercurial/branchmap.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/branchmap.py	Fri Aug 17 10:21:25 2018 +0900
+++ b/mercurial/branchmap.py	Fri Aug 17 10:24:29 2018 +0900
@@ -40,7 +40,7 @@
 def read(repo):
     try:
         f = repo.cachevfs(_filename(repo))
-        cachekey = next(f).split(" ", 2)
+        cachekey = next(f).rstrip('\n').split(" ", 2)
         last, lrev = cachekey[:2]
         last, lrev = bin(last), int(lrev)
         filteredhash = None
@@ -53,6 +53,7 @@
             raise ValueError(r'tip differs')
         cl = repo.changelog
         for l in f:
+            l = l.rstrip('\n')
             if not l:
                 continue
             node, state, label = l.split(" ", 2)