Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce integration with visual studio without project files being checked in to perforce

I am working on a large source base (approx 15K files) decomposed into about 25 projects. I want to keep the source in perforce (and am evaluating perforce to that end) but due to complications in the setup it isn't possible for me to keep the visual studio projects in source control, I know in theory the answer to this is to check the projects in, but that isn't feasible (we would end up with projects for several versions of VS checked in, and additionally several variants of each of these, instead they are generated automatically and this setup works very well).

Is there a way to get VS to checkout files for editing as it goes without adding the project to perforce, to avoid the user having to go to the perforce client and manually check out each file for editing as they go? Alternatively (and even better) is there a way to get VS to recognise that the files in a project are under source control, without having to add the project to source control also?

I know we could also take the tack of having every user check out for editing all files they might potentially want to edit ahead of time, then revert unmodified files before submitting their changes, is there a performance penalty in perforce in taking this approach?

like image 944
nfg Avatar asked Jan 19 '09 18:01

nfg


Video Answer


3 Answers

In your case, I'd suggest not using the visual studio integration for Perforce.

You can either add Perforce commands to the Tools Menu, or try Nifty Perforce from Google:

http://code.google.com/p/niftyplugins/

like image 168
Mark James Avatar answered Oct 14 '22 23:10

Mark James


One option is to use Perforce as if you were disconnected from the server and reconcile your changes later, rather than telling Perforce everything you do before you do it. (This is roughly equivalent to the workflow in CVS or Subversion.) You would synchronize your working copy, go off and develop, and then ask Perforce to figure out what you did while it wasn't watching.

Perforce has a nice document describing the process: Working Disconnected From The Perforce Server

One thing the document doesn't mention is the allwrite clientspec attribute, which marks all files in your working directory as writable instead of only the files you have checked out.

like image 33
Commodore Jaeger Avatar answered Oct 14 '22 21:10

Commodore Jaeger


For the sake of completeness: There is a new tool for your wish called P4VS. I like it better that P4SCC which never worked for me as I wanted.

like image 41
Michael S. Avatar answered Oct 14 '22 23:10

Michael S.