Jump to content

Dave Foglesong

Member Since 22 Sep 2014
Offline Last Active Sep 03 2020 11:56 PM

Posts I've Made

In Topic: Moving files(s) from one shelf to another without unshelving

24 March 2020 - 05:26 AM

"p4 reshelve" will get you halfway there, it copies a file from one shelved change to another.

It should be possible to create a p4 command alias that does "p4 reshelve" to copy a file from one shelved change to another, then do a "p4 shelve -d" to remove the file from the first shelved change.

In Topic: trigger on revert files?

17 March 2020 - 10:18 PM

Yes, you should be able to make a pre- or post-command trigger that runs on the revert command.

See: https://www.perforce...gers.order.html

However, most likely you'll want the trigger to do something based on what files are being reverted, and that gets a bit harder. The trigger can access the command args, but if the user runs a command with a wildcard (such as "p4 revert ..." or "p4 revert *") the trigger won't know what the wildcard maps to in the context (user/client/working dir) where the command was run. You'd have to create a pre-command trigger that mimics the context and runs "p4 revert -n" with that wildcard to get the file list. (You can't do this in a post-command trigger, because by that point the files have been reverted, and "p4 revert -n" will return no files.)

If you're using a broker, you can also do something similar with a broker filter program that runs on the "revert" command. But the same issue with determining what files are in a command that uses a wildcard also exists with the broker.

It may be possible to do something with the new Perforce server extensions. I haven't experimented with those yet, so I don't know what's possible with them.

In Topic: Settings for perforce

21 January 2020 - 03:01 AM

From the context, I'd guess BC is "Beyond Compare". I don't use that program myself, so I can't answer the question.

But this seems to have the info needed to use Beyond Compare with both P4V and the p4 command line tools:


In Topic: non-superusers editing groups in p4admin

16 October 2019 - 05:06 PM

If you have access to the server logs, I'd look there to check he's actually using his account and is running the right command. (If you're using structured logs, you can use "p4 logparse" to examine records in them without access to the server. But I find it a lot easier to just grep the logs. Or dump the logs into Splunk.)

Does the user get an error? That would normally indicate what's wrong. If he's not in the group, it would say so. Or if he's trying to use -A (instead of -a) it should say he doesn't have permission for that operation.