Skip to content

Instantly share code, notes, and snippets.

@erichsu
Created July 4, 2013 07:16
Show Gist options
  • Save erichsu/5925572 to your computer and use it in GitHub Desktop.
Save erichsu/5925572 to your computer and use it in GitHub Desktop.
[PATCH] git-p4: support exclusively locked files
def getP4OpenedType(file):
# Returns the perforce file type for the given file.
result = p4_read_pipe(["opened", wildcard_encode(file)])
match = re.match(".*\((.+)\)(?:.+)?\r?$", result)
if match:
return match.group(1)
else:
die("Could not determine file type for %s (result: '%s')" % (file, result))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment