changeset 424:3ae8edc3d8f1

stupid: handle the new eol option in hg-crew.
author Augie Fackler <durin42@gmail.com>
date Mon, 15 Jun 2009 12:26:18 -0500
parents 021bdbf391bb
children f5222d021665
files hgsubversion/stupid.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -55,8 +55,8 @@ def mempatchproxy(parentctx, files):
     patchfile = patch.patchfile
 
     class mempatch(patchfile):
-        def __init__(self, ui, fname, opener, missing=False):
-            patchfile.__init__(self, ui, fname, None, False)
+        def __init__(self, ui, fname, opener, missing=False, eol=None):
+            patchfile.__init__(self, ui, fname, None, False, eol)
 
         def readlines(self, fname):
             if fname not in parentctx:
@@ -78,9 +78,11 @@ def mempatchproxy(parentctx, files):
 
 def filteriterhunks(meta):
     iterhunks = patch.iterhunks
-    def filterhunks(ui, fp, sourcefile=None):
+    def filterhunks(ui, fp, sourcefile=None, textmode=False):
         applycurrent = False
-        for data in iterhunks(ui, fp, sourcefile):
+        # Passing False instead of textmode because we should never
+        # be ignoring EOL type.
+        for data in iterhunks(ui, fp, sourcefile, False):
             if data[0] == 'file':
                 if data[1][1] in meta.filemap:
                     applycurrent = True