Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

P4 changes on a specific folder/file

Tags:

perforce

I am trying to get the last checkin on a particular folder structure on perforce, I know "p4 changes -m1 'filepath" does the job, but the problem is the filepath has to be the depot file-path. What I have on the other hand is the local filepath something like "C:\Android\Version10.2\MyApp\" and not "//depot/Andoid/Version10.2/MyApp".

I tried using commands like "p4 fstat", "p4 where" and "p4 files", but for all of them it works fine with the depot file path, if I give the local file path, it keeps complaining file(s) not on client/no such file(s).

The other issue is I dont have rights to change the p4client on the machine. How do I get this to work?

Basic question then to sum up is being able to get the last change on a folder/file for which I have the local filepath.

Regards

like image 310
mayank Avatar asked Jul 20 '26 12:07

mayank


1 Answers

If you're going to run any commands on files those files have to be in the workspace. The problem is probably that p4 on Windows defaults to the machine name as the workspace name if you don't supply one.

So you either have to run set P4CLIENT=<clientname> then run p4 changes -m1 <filename>, or p4 -c <clientname> changes -m1 <filepath> where <filepath> can be the file on your local file system, so C:\Android\Version10.2\MyApp\ would be acceptable.

like image 61
aflat Avatar answered Jul 28 '26 16:07

aflat