From 8a2d69159b10670a824c7af3b84ba77545d319a3 Mon Sep 17 00:00:00 2001 From: Ben Scott Date: Thu, 11 Apr 2013 12:03:17 -0700 Subject: [PATCH] Handle percent-encoded special characters. @,#,*,% have special meaning in perforce and are url-style %-escaped. Ensure those characters get unescaped before importing into git. --- git-p4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/git-p4 b/git-p4 index 7525d2d..48612af 100755 --- a/git-p4 +++ b/git-p4 @@ -10,6 +10,7 @@ import optparse, sys, os, marshal, subprocess, shlex import tempfile, os.path, time, platform +import urllib import re import cStringIO import StringIO @@ -1306,6 +1307,9 @@ class P4Sync(Command): if path.startswith(p): path = path[len(p):] + # paths come in percent-encoded for @,%,#,* (url-style) + path = urllib.unquote(path) + return path def splitFilesIntoBranches(self, commit):