From: Simon Hausmann Date: Mon, 11 Jun 2007 06:50:57 +0000 (+0200) Subject: Fix project name guessing X-Git-Tag: v1.5.3-rc0~65^2^2~16 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6e5295c4d3e4e79838d1dd7ab4a8b4965e1c7f96;p=git.git Fix project name guessing Signed-off-by: Simon Hausmann --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 9d52eada4..551573afc 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -909,7 +909,12 @@ class P4Sync(Command): def guessProjectName(self): for p in self.depotPaths: - return p [p.strip().rfind("/") + 1:] + if p.endswith("/"): + p = p[:-1] + p = p[p.strip().rfind("/") + 1:] + if not p.endswith("/"): + p += "/" + return p def getBranchMapping(self): for info in p4CmdList("branches"):