From: Pete Wyckoff <pw@padd.com>
To: Danny Thomas <Danny.Thomas@blackboard.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-p4: support exclusively locked files
Date: Sun, 17 Mar 2013 16:04:37 -0400 [thread overview]
Message-ID: <20130317200437.GA29115@padd.com> (raw)
In-Reply-To: <CD666D0F.1DC6E%danny.thomas@blackboard.com>
Danny.Thomas@blackboard.com wrote on Wed, 13 Mar 2013 13:51 -0400:
> 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.
Can you explain how to configure p4d to default everything to
binary+l? Also, what version are you using ("p4 info")? I'm
trying to write a test case for this.
I did find a way to play with typemap to get +l, as:
( p4 typemap -o ; printf "\tbinary+l\t//.../bash*" ) | p4 typemap -i
With this, the 2011.1 here just says:
tic-git-test$ p4 opened bash
//depot/bash#1 - add default change (binary+l)
I've not been able to make it say " *exclusive*" too.
> result = p4_read_pipe(["opened", wildcard_encode(file)])
> - match = re.match(".*\((.+)\)\r?$", result)
> + match = re.match(".*\((.+)\)(?:.+)?\r?$", result)
I think this whole function would be less brittle
using p4's "-G" output, like:
d = p4Cmd(["fstat", "-T", "type", wildcard_encode(file)])
# some error checking
return d['type']
But I'm curious if your p4d includes " *exclusive*" in the
type there too, in which case we'll have to strip it.
Thanks for starting the patch on this. It's good if we can keep
others from running into the same problem.
-- Pete
next prev parent reply other threads:[~2013-03-17 20:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 17:51 [PATCH] git-p4: support exclusively locked files Danny Thomas
2013-03-17 20:04 ` Pete Wyckoff [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130317200437.GA29115@padd.com \
--to=pw@padd.com \
--cc=Danny.Thomas@blackboard.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).