Created
July 4, 2013 07:16
-
-
Save erichsu/5925572 to your computer and use it in GitHub Desktop.
[PATCH] git-p4: support exclusively locked files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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