git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-p4: support exclusively locked files
@ 2013-03-13 17:51 Danny Thomas
  2013-03-17 20:04 ` Pete Wyckoff
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Thomas @ 2013-03-13 17:51 UTC (permalink / raw)
  To: git

By default, newly added binary files are exclusively locked by Perforce:

'add default change (binary+l) *exclusive*'

This results in a 'Could not determine file type' error as the regex
expects
the line to end after the file type matching group. Some repositories are
also configured to always require exclusive locks, so may be a problem for
all revisions in some cases.

Signed-off-by: Danny Thomas <dthomas@blackboard.com>
---
git-p4.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-p4.py b/git-p4.py
index 0682e61..ffba294 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -326,7 +326,7 @@ 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)
+    match = re.match(".*\((.+)\)(?:.+)?\r?$", result)
     if match:
         return match.group(1)
     else:
--
1.8.1.5





This email and any attachments may contain confidential and proprietary information of Blackboard that is for the sole use of the intended recipient. If you are not the intended recipient, disclosure, copying, re-distribution or other use of any of this information is strictly prohibited. Please immediately notify the sender and delete this transmission if you received this email in error.

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-24 22:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-13 17:51 [PATCH] git-p4: support exclusively locked files Danny Thomas
2013-03-17 20:04 ` Pete Wyckoff
2013-03-18 13:26   ` Danny Thomas
2013-03-19 19:23     ` Pete Wyckoff
2013-03-20 11:33       ` Danny Thomas
2013-03-24 22:19         ` Pete Wyckoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).