I'm trying to delete the files and history from a Stream
I tried "p4 obliterate" command, but it says "you don't have permission for this operation" but I create this stream and also I'm the only user and also the super user , show by here , So my QUESTION is why and how can delete the stream , thanks . I know people say not recommend to NOT DO THIS.I have my own reason so don't worry.
Prior to running "p4 obliterate", run "p4 info" and check what it says your user name is.
If it does not say "kitman.yiu", do:
p4 set P4USER=kitman.yiu
and try again.
Related
I tried to add a new file using
sd add myfile.txt
But I get this error saying
myfile.txt - file(s) not in client view.
Can you please tell me how can I fix it?
The general answer is that you need to edit the client view and/or root ("sd client") so that your local "myfile.txt" is mapped to the depot.
For a more specific answer I'd need to know:
The full local path of myfile.txt
The full depot path you want to add it to
I am planning to create a cron job that does a p4 sync on a specific folder every day at a certain time and does some post processing of the files in the folder.
However, before doing the post processing I would like to check if the files in the folder differ from that of the perforce repository, and only if there are changes, I'd go ahead with the post processing.
How do I integrate a p4 diff with my csh script and if there's any other elegant way to check for differences and trigger the post processing.
In summary, I'm trying to achieve this:
if (check for differences in <my directory>) then
{ run my post-processing script }
else
{ dont run}
If you want to see if any new revisions have been added to the depot since your sync completed, you could run:
p4 have
in your workspace, and compare this to the output from:
p4 files
run against the corresponding depot files and/or directories.
Example:
jen#Jen: ~/workspaces/testing/depot/depot/testingjen#Jen:~/workspaces/testing/depot/depot/testing$ p4 have //depot/testing/...
//depot/testing/test#1 - /home/jen/workspaces/testing/depot/depot/testing/test
jen#Jen: ~/workspaces/testing/depot/depot/testingjen#Jen:~/workspaces/testing/depot/depot/testing$ p4 files //depot/testing/...
//depot/testing/test#2 - edit change 7445 (text)
Hope this helps,
Jen.
I am using following command to sync B vob files from A vob
clearfsimport -master -follow -nsetevent -comment $2 /vobs/A/xxx/*.h /vobs/B/xxx/
It works fine. But it will check in all the changes automatically. Is there a way to do the same task but leave the update files in a check out status?
I want to update the file for B from A. Build my programme, and then re-cover the branch. So if the updated files is an check out status, I can do unco later. Well with my command before, everything is checked in. I cann't re-cover my branch then.
Thanks.
As VonC said, it's impossible to prevent "clearfsimport" to do the check in. And he suggested to use a label to recover back.
For me, the branch where I did "clearfsimport" is branched from a label.Let's call it LABEL_01. So I guess I can use that label for recovery. Is there an easy way (one command) to recover the files under /vobs/B/xxx/ to label LABEL_01 ? I want to do it in my bash script, so the less/easy the command is, the better.
Thanks.
After having a look at the man page for clearfsimport, no, it isn't possible to prevent the checkins.
I would set a label before the clearfsimport, and modify the config spec for the new version to be created in a branch (similar to this config spec).
That way, "re-cover" the initial branch would be easy: none of the new version would have been created in it.
I want to create a p4 branch based on branch mvs_1211_hf at this label CC2P4_MVS_1211_HF_PILOT1, but the p4 command response is not my expectation. Anyone can help on this? Or is there any ways to create branch in p4? Thanks in advance!
Here is the p4 command i run:
p4 integ //depot/MVS_IMPORT/mvs_1211_hf/tms_dev/...#CC2P4_MVS_1211_HF_PILOT1 //deport/1211_hf/...
Here is the p4 complains:
//deport/1211_hf/... - must refer to client 'ruilong_mvs_1211_hf_pilot1'.
Best regards,
Ruilong
Typical errors include the ones previously mentioned, plus:
//depot1/... - must refer to client 'clientname'.
Check the client workspace view by running:
p4 client -o clientname
Check the "View" lines in the client workspace specification to confirm that the file specification used in your Perforce command (or appearing in the error message) falls within your workspace view.
If needed, change the client workspace by running:
p4 client clientname
Find more at: http://answers.perforce.com/articles/KB_Article/Common-Permissions-and-File-Access-Problems
Thanks
I received this error, when the path simply did not exists... had a typo :/
The must refer to client <client> error is the generic error given when an absolute path is neither a valid depot path nor a valid client path within the context of the current client. In this case, the cause of the error is that you typed //deport instead of //depot.
It would be more accurate for the error to say must be a depot path or a client path referring to current client <client>, but Perforce error messages tend to err on the side of brevity.
I'm new to Perforce, and it is not going well at all. But currently, I am completely stuck, as all I can get it to say is:
$ p4 open a_code_file.cpp
Locked client 'my_hostname' can only be used by owner 'perforce'.
I have absolutely no idea what I did to upset it, and the error message itself is meaningless gibberish to me. "perforce" doesn't own anything - all the files are owned by me. I am in a Perforce repository, ie, there's a .p4rc a few directories up.
Edit: It only seems to be some files. If I:
$ cd some_other_directory_in_the_repo
$ p4 open a_file
... it works. So it's only some things...
The "locked client" error suggests that p4 is trying to use a client workspace, named after your hostname, owned by the user perforce. If Perforce can't find a valid client name, either in the registry (on Windows), environment variables, or in an environment file, it'll default to using a client workspace named after your hostname.
It sounds like Perforce can't find a valid client workspace for your "broken" directory, and finds one for your "working" directory.
Since you have one directory that works, and one directory that doesn't, can you try:
$ p4 set
from both directories, and compare the results? If Perforce can find a valid client, you'll see something like:
P4CLIENT=XXXX (config)
(the "(config)" means Perforce is getting that configuration variable from a configuration file. Consult p4 help set for more information on the various ways you can set variables.)
Look also for a line like:
P4CONFIG=.p4env
which is what Perforce will use to search for your workspace configuration. If you're using a file named .p4rc, that's what P4CONFIG should be set to.
I ran into this when I was distracted and forgot to export my P4CLIENT variable, i.e.:
P4CLIENT=XXXXX
Instead of:
export P4CLIENT=XXXXX