]> asedeno.scripts.mit.edu Git - git.git/blobdiff - contrib/fast-import/git-p4
bash completion: add 'rename' subcommand to git-remote
[git.git] / contrib / fast-import / git-p4
index ee504e90ed81720829f547d0a1bff41f368be18c..a85a7b2a583ee9270fc2d765ec8c8c6e9d6b5e32 100755 (executable)
@@ -249,9 +249,16 @@ def p4Where(depotPath):
     outputList = p4CmdList("where %s" % depotPath)
     output = None
     for entry in outputList:
-        if entry["depotFile"] == depotPath:
-            output = entry
-            break
+        if "depotFile" in entry:
+            if entry["depotFile"] == depotPath:
+                output = entry
+                break
+        elif "data" in entry:
+            data = entry.get("data")
+            space = data.find(" ")
+            if data[:space] == depotPath:
+                output = entry
+                break
     if output == None:
         return ""
     if output["code"] == "error":