Skip to contentSkip to conversation

git-p4: remove tabs from usermap file

PATCH New Pete Wyckoff 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-p4: remove tabs from usermap file

Some users have tabs in their names, oddly enough. This causes problems when loading the usercache from disk, as split separates the fields on the wrong tabs. When fast-import's parse_ident() tries to parse the committer field, it is unhappy about the unbalanced <..> angle brackets.

It is easy enough to convert the tabs to single spaces.

---
 contrib/fast-import/git-p4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
contrib/fast-import/git-p4 +1 -1
index 3832f60..342529d 100755
@@ -1142,7 +1142,7 @@ class P4Sync(Command):
 
         s = ''
         for (key, val) in self.users.items():
-            s += "%s\t%s\n" % (key, val)
+	    s += "%s\t%s\n" % (key.expandtabs(1), val.expandtabs(1))
 
         open(self.getUserCacheFilename(), "wb").write(s)
         self.userMapFromPerforceServer = True
Signature · 1 line
1.6.0.6