tags:

views:

272

answers:

5

Greetings We run perforce with several users. Each user has their own development website that shows files in their workspace. This is great for making and viewing changes to webpages before submitting them.

Sometime ago, we deleted a few pages in Perforce. I would like to revive these pages, but not to make them visible on our live site. I want to view them in my workspace and on my dev site, but I do want to push them out to our live server.

In the "depot" tab of my P4 client, I can see the deleted files. I cannot see them in the "Workspace" tab of my client.

How can I revive them for use in my Workspace, but not make them live to the world?

I'm not a P4 admin so I could use a little guidance.

Thanks for any help,

A: 

Am I missing something? They won't be live unless you put them on your live site.

Brian Carlton
+1  A: 

With Perforce until you commit most commands don't do anything other than affect your local view of the repository.

So you can check out older versions of the file and have them in your client and as long as you don't check them in no one else (including your live site) will see them.

Aaron
+3  A: 

Found my answer. A colleague suggested I Google on "Get Revision..."

http://kb.perforce.com/UserTasks/ManagingFile..Changelists/RecoveringDeletedFiles

I used all but the last two steps and it worked.

In the P4V GUI:

  • Ensure that the deleted files are shown in the Depot View pane (go to the View menu, select the Filter Depot menu and click on Show Deleted Depot Files)
  • Locate the file in the Depot View pane
  • Context-click on the file and select "Get Revision"
  • In the "Get Revision" dialog box, click on the radio button for "Specify revision using:" and leave "Revision" in the drop down box
  • In the empty box to the right of the "Revision" drop down item, type in the number of the last good revision of the file
  • Click "Get Revision"
  • In the Depot View pane, context-click on the file and select "Mark for Add"
  • In the Depot View pane, context-click on the file and select "Submit"
  • Fill in the changelist description and click "Submit"
John Cowan
A: 

Thanks for all the replies. I'm not a Perforce Guru so forgive me if I state this incorrectly.

Our system is set up so that we have our Live production site. Files submitted in perforce show on this Live site, as is normal. The general public sees this site. Each developer also has his/her own development site that only we can see. It mirrors our Live site. Our changes to a checked-out file in Perforce can be viewed in our development site, but not the Live site - until we submit the change(s). As expected, this allows us to view our changes before making them live.

When we delete files in Perforce, they are removed from our Workspace. I can still see them in my Depot tab, but they are not visible in either my Development site or in the Live site. What I wanted to do was to get the deleted files back into my Workspace so I could view them in my Development site, but not have them be visible (checked in) on our Live site.

The last post I made with instructions on doing this worked for my purpose. The files are back in my workspace but only visible in my Development site.

I was afraid of doing some Perforce restore of the files that might automatically make them live on our Live site again. This thinking was due to my inexperience with Perforce. With all your help, I now know how to do this.

Thanks again,

John Cowan
A: 

In both p4win and p4v there is an option to 'show deleted files'. In p4win and p4v, you can right click a file and select 'recover deleted file'. This does what you're doing manually, and the file will be open for add.

Epu