Jump to content


Miles O'Neal

Member Since 28 Oct 2014
Offline Last Active Jan 15 2019 04:57 PM
-----

Topics I've Started

protect table: regex capture strings?

14 December 2018 - 10:15 PM

A good bit of our protects table is of the form:

read  group read-fred  * //fred/...
write group fred       * //fred/...

. We create these two groups (<depotname> and read-<depotname>) for every project.

Is there a way to do something like perl's capture strings? If so, we could reduce over a thousand lines to two:

read  group read-(.*)  * //$1/...
write group (.*)       * //$1/...

Thanks,
Miles

brokers: filter runs on one, fails on another

30 October 2018 - 05:24 PM

We have two, essentially identical[1] forwarding replicas that are remote from the master. Call them E and M.
On each of these hosts, we have a broker that handles various things, including enhanced commands (using filters).
Some of the enhanced commands are there to let non-super users run specific things that require super access. These work fine on server E but fail on server M with "Perforce password (P4PASSWD) invalid or unset."
I can run the filter line (as it appears in the broker config file) manually on host M, both as myself and as the p4 user (which the broker runs as). The p4 user is a UNIX-only user; we have no Helix user named p4. In both cases the filter runs fine from the command line with no password errors. This tells me the tickets file is good and that the super user is logged in. I can also run the straight Helix command the filter ends up running (p4 -u foo -p host command)- again as myself or p4- and it works.
What could cause this to fail when run from the broker on host M, but wrok on the command line on M, and work in all cases on E?

Thanks for any insights.

[1] The only configuration differences are things like serverid, ldap configs, tcpsize tweaks, etc.

cmooand line: adding control characters to descriptions

04 October 2018 - 03:39 PM

A user wants to generate a client or modify a client from the command line with a multi-line description field. Ideally this could be done with

% p4 --field "Description=new\n\tline" client -o newline_test |  p4 client -i

For now we have a workaround of:

%  p4 --field "Description=fred" client -o newline_test | sed -e 's/fred/new\n\tline/' |  p4 client -i

I'm assuming there's a way to do this without the intermediate sed step, but haven't been able to find it online or through experimentation.

Thanks!

perl API: Connect() displaying unexpected output

04 September 2018 - 07:45 PM

I get the usual (but unexpected in this case) P4 error message if p4perl cannot connect.

Code:
p4->Connect or die("Cannot connect");

Result on error:
Connect to server failed; check $P4PORT.
TCP connect to xyzzy:nnnn failed.
connect: xxx.yyy.zzz.yyy:nnnn: Connection refused

Cannot connect

This occurs with both 2014.1/842847 (2014.1/821990 API) and 2016.1/1388481 (2018.1/1388481 API).
Setting the debug level with p4->Debug(0) makes no difference.

How can I best suppress the extraneous error messages?

Max journal sequence number?

16 August 2018 - 07:23 PM

What is the max journal sequence number before it rolls over? Thanks.
2017.1 on Linux if it matters.