From e7d3ee6b59c7c7dfc8d11fa5064f97db42cfc235 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Thu, 24 May 2007 14:07:55 +0200 Subject: [PATCH] Replace with when importing from p4 on Windows --- git-p4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-p4 b/git-p4 index 9e9d623..09b3cb5 100755 --- a/git-p4 +++ b/git-p4 @@ -540,6 +540,7 @@ class P4Sync(Command): self.verbose = False self.importIntoRemotes = True self.maxChanges = "" + self.isWindows = (platform.system() == "Windows") def p4File(self, depotPath): return os.popen("p4 print -q \"%s\"" % depotPath, "rb").read() @@ -647,6 +648,9 @@ class P4Sync(Command): data = self.p4File(depotPath) + if self.isWindows and file["type"].endswith("text"): + data = data.replace("\r\n", "\n") + self.gitStream.write("M %s inline %s\n" % (mode, relPath)) self.gitStream.write("data %s\n" % len(data)) self.gitStream.write(data) -- 2.11.4.GIT