Re: [p4] Anyone have a way to preview p4 protect updates outside of the P4V admin tool?

Sambwise <[email protected]> Mon, 2 Apr 2018 14:20:01 -0700
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'Sambwise'.



[https://forums.perforce.com/index.php?app=forums&module=forums&section=findpost&pid=23248]
Matt Janulewicz, on 2018/04/02 20:21:36 UTC, said:
>    I don't think the protections table is cloned into a DVCS instance, and a very cursory test seems to not allow cloning of the spec depot
>     
"Cloning" any spec from one server to another is trivial:

p4 -p server1:1666 protect -o | p4 -p server2:1666 protect -i  
I wrote more than one script that did this before DVCS was a thing.  
:)   That's pretty much what I was envisioning when I was talking
about running the check on a sidetrack server.  Take your new
protection table, pipe it into a local server instance, do whatever you want,
delete the local server.

Though really, emulating the protection table (using the Spec and Map APIs)
seems easier the more I think about it.  Most of the complexity is in
parsing the spec and combining the mappings, and those two APIs do that work for
you.



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/5674-anyone-have-a-way-to-preview-p4-protect-updates-outside-of-the-p4v-admin-tool
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user