aboutsummaryrefslogtreecommitdiff
path: root/contrib/fast-import/git-p4
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/fast-import/git-p4')
-rwxr-xr-xcontrib/fast-import/git-p412
1 files changed, 4 insertions, 8 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index e710219ca..cd96c6f81 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -729,13 +729,10 @@ class P4Submit(Command):
tmpFile.write(submitTemplate + separatorLine + diff + newdiff)
tmpFile.close()
mtime = os.stat(fileName).st_mtime
- defaultEditor = "vi"
- if platform.system() == "Windows":
- defaultEditor = "notepad"
if os.environ.has_key("P4EDITOR"):
editor = os.environ.get("P4EDITOR")
else:
- editor = os.environ.get("EDITOR", defaultEditor);
+ editor = read_pipe("git var GIT_EDITOR").strip()
system(editor + " " + fileName)
response = "y"
@@ -970,9 +967,8 @@ class P4Sync(Command):
elif file["type"] == "symlink":
mode = "120000"
# p4 print on a symlink contains "target\n", so strip it off
- last = contents.pop()
- last = last[:-1]
- contents.append(last)
+ data = ''.join(contents)
+ contents = [data[:-1]]
if self.isWindows and file["type"].endswith("text"):
mangled = []
@@ -1040,7 +1036,7 @@ class P4Sync(Command):
if includeFile:
filesForCommit.append(f)
- if f['action'] not in ('delete', 'purge'):
+ if f['action'] not in ('delete', 'move/delete', 'purge'):
filesToRead.append(f)
else:
filesToDelete.append(f)