Fix project name guessing
Signed-off-by: Simon Hausmann <simon@lst.de>
Simon Hausmann committed
Jun 11, 2007 at 08:50 UTC
6e5295c4d3e4e79838d1dd7ab4a8b4965e1c7f96
1 file changed
+6
-1
contrib/fast-import/git-p4
+6
-1
@@ -909,7 +909,12 @@ class P4Sync(Command):
909
910
def guessProjectName(self):
911
for p in self.depotPaths:
912
- return p [p.strip().rfind("/") + 1:]
912
+ if p.endswith("/"):
913
+ p = p[:-1]
914
+ p = p[p.strip().rfind("/") + 1:]
915
+ if not p.endswith("/"):
916
+ p += "/"
917
+ return p
918
919
def getBranchMapping(self):
920
for info in p4CmdList("branches"):