Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep change history while renaming files in Visual Studio using Perforce

I know there are already several questions about renaming files by using a version control system. But I did not found a satisfactory answer to the special version control system Perforce.
My question: Is there a plug-in/solution which keeps the version history of my C# code files when I renaming it within Visual Studio?

Edit: Currently I am using VS2P4 plug-in.

Edit2: I have found a little shorter way to rename a file:

  1. Open containing folder in Explorer (in Solution Explorer right-click Open in Windows Explorer).
  2. Select file and right-click Perforce->Show in P4V.
  3. Do the normal rename/move action with selected file.

That scenario is shorter than navigating in Perforce Depot in P4V until I find the right file. But of course I am looking for a shorter way.

Edit3: Is there a way to directly do "Show in P4V" with file selection within VS?

like image 438
brgerner Avatar asked Feb 15 '12 13:02

brgerner


1 Answers

There's a new Visual Studio plugin for Perforce that will be out in beta shortly. It does have support for the built-in Visual Studio rename operation, and also works well with Resharper.

Until it's out I'm afraid the existing solutions are a bit clunky.

like image 160
randy-wandisco Avatar answered Sep 28 '22 14:09

randy-wandisco