# HG changeset patch # User Augie Fackler # Date 1245086778 18000 # Node ID 3ae8edc3d8f15a85d74dc0ac1556a7aa178f5777 # Parent 021bdbf391bb429996e60497659c5db35c349c2d stupid: handle the new eol option in hg-crew. diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py --- 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