Domanda

I'm writing some script but I need to first get the source code from P4. How do I edit the client workspace in my script?

Here are the steps that I normally take using bash:

export P4CLIENT=myworkspace
p4 client
//now I manually edit the source and destination directory using Vim
p4 sync

Thanks in advance!!!

È stato utile?

Soluzione

p4 client can use standard input and output.

export P4CLIENT=myworkspace
p4 client -o > /tmp/myclient.$$ # Write client to a temp file
# Commands to update /tmp/myclient with the changes you need
p4 client -i < /tmp/myclient.$$
p4 sync
rm /tmp/myclient.$$

Altri suggerimenti

I just had to change 98% of my users from "perforce" authentication to "ldap"

I repeated this command for each p4 user:

((p4 user -o %p4user%) | sed "s/perforce/ldap/g") | p4 user -i -f

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top