[PATCH 03 of 10 py3] manifest: unbreak pure-python manifest parsing on Python 3

Augie Fackler raf at durin42.com
Sun Mar 12 14:57:43 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489297461 18000
#      Sun Mar 12 00:44:21 2017 -0500
# Node ID ecf0bd03ed286a87a7cac46594a241b65e130abf
# Parent  f3120d2bdfa4d1b82b586309c7632e2fd00a0d43
manifest: unbreak pure-python manifest parsing on Python 3

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -172,7 +172,7 @@ class _lazymanifest(object):
         if not data:
             return []
         pos = data.find("\n")
-        if pos == -1 or data[-1] != '\n':
+        if pos == -1 or data[-1:] != '\n':
             raise ValueError("Manifest did not end in a newline.")
         positions = [0]
         prev = data[:data.find('\x00')]


More information about the Mercurial-devel mailing list