Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverting files in Perforce for the same user in different workspace from UI

Tags:

perforce

I had checked out a file in p4 with my user id in diff machine. Now i want to revert that file [checked out] from my new machine. Please help me on this. Also is it possible to revert from command line as well from windows.

like image 271
Dhiyaneswaran Avatar asked Nov 19 '25 07:11

Dhiyaneswaran


1 Answers

You can use the '-c' flag to specify the client you were using, when you opened the file.

For example:

  bash-3.2$ p4 info
  User name: jenbottom
  Client name: blar_ws
  Client host: Jens-MBP.lan

  bash-3.2$ p4 opened -a
  //depot/file1#1 - edit default change (text) by jenbottom@Jens-MBP
  bash-3.2$ p4 -c Jens-MBP revert //...

  //depot/file1#1 - was edit, reverted

Note that if you have the 'Host' field set, and the client you opened the file on was on a different host than the one being used when you try to revert the file, the above will not work.

Hope this helps, Jen.

like image 172
P4Jen Avatar answered Nov 21 '25 06:11

P4Jen