Patchwork [1,of,2,V2] statichttprepo: pass in True to splitlines, not 1

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 17, 2013, 9:41 p.m.
Message ID <e1ef7723bb1da674a1a8.1384724502@dev1091.prn1.facebook.com>
Download mbox | patch
Permalink /patch/3046/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 17, 2013, 9:41 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1384723691 28800
#      Sun Nov 17 13:28:11 2013 -0800
# Node ID e1ef7723bb1da674a1a85cc872437735e8f4b08e
# Parent  c3b07326434223e8957ea6e332d80f4cf5caa84a
statichttprepo: pass in True to splitlines, not 1

splitlines actually takes a boolean.

Patch

diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py
+++ b/mercurial/statichttprepo.py
@@ -55,7 +55,7 @@ 
         self.pos += len(data)
         return data
     def __iter__(self):
-        return iter(self.read().splitlines(1))
+        return iter(self.read().splitlines(True))
     def close(self):
         pass