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

login
register
mail settings
Submitter Augie Fackler
Date March 12, 2017, 6:57 p.m.
Message ID <ecf0bd03ed286a87a7ca.1489345063@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19204/
State Accepted
Headers show

Comments

Augie Fackler - March 12, 2017, 6:57 p.m.
# HG changeset patch
# User Augie Fackler <augie@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

Patch

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')]