Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to recover deleted shelved files in perforce?

Tags:

perforce

I had some changes shelved in a change list. Looks like I've deleted those shelved files by mistake. I don't keep much hopes of recovering them but given that shelving puts the changes in the server, Is there any chance that these are still accessible somewhere?

Thank you

like image 880
Luis Avatar asked Jun 04 '13 16:06

Luis


3 Answers

Unfortunately, once you've deleted the shelved files from the repository (no longer attached to a changelist), they are no longer stored anywhere that they can be retrieved.

I just dealt with this today on a depot that I was working on with a shelved file and executed the operations out of order, deleting what I wanted to save. In my case, I have a continuous backup system and was able to recover using that.

Generally, we're moving to task streams because of things like this. One of the benefits of the new "task streams" is that they provide the short-lived aspects of shelving and rapid branching without muddying up the whole repository. Basically similar to the lightweight branching in git.

like image 134
gaige Avatar answered Nov 11 '22 10:11

gaige


What worked for me is that i've had them diffed recently. So, i found them in the Perforce temp folder: C:\Users\\AppData\Local\Temp\p4v\PC101907_perforce_1666

like image 26
The Dark Brainer Avatar answered Nov 11 '22 11:11

The Dark Brainer


If you've only deleted the local files, and not the shelved change itself, you should be able to recover them by unshelving the change:

p4 unshelve -s <change>
like image 27
DRH Avatar answered Nov 11 '22 12:11

DRH