Perforce与visual studio集成,无需将项目文件签入perforce

时间:2023-01-15 00:21:23

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).

我正在研究一个大型源代码库(约15K文件),分解为大约25个项目。我希望将源保持在perforce(并且我正在评估perforce)但由于设置的复杂性,我不可能将视觉工作室项目保持在源代码控制中,我在理论上知道答案是检查项目,但这是不可行的(我们最终会为几个版本的VS签入项目,另外还有几个变体,而不是它们是自动生成的,这个设置非常有效)。

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?

有没有办法让VS签出文件进行编辑,因为它没有将项目添加到perforce,以避免用户必须转到perforce客户端并手动检出每个文件进行编辑?或者(甚至更好)有一种方法可以让VS识别项目中的文件是否受源代码控制,而不必将项目添加到源代码控制中?

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?

我知道我们也可以考虑让每个用户检查出他们可能想要提前编辑的所有文件,然后在提交他们的更改之前还原未修改的文件,采用这种方法会对性能造成损害吗?

3 个解决方案

#1


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

在您的情况下,我建议不要使用Perforce的visual studio集成。

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

您可以将Perforce命令添加到“工具”菜单,或者尝试使用Google的Nifty Perforce:

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

#2


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,就好像您与服务器断开连接并稍后协调您的更改,而不是在执行之前告诉Perforce您执行的所有操作。 (这大致相当于CVS或Subversion中的工作流程。)您可以同步您的工作副本,进行开发,然后让Perforce弄清楚您在不看的时间做了什么。

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

Perforce有一个很好的文档描述了这个过程:与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.

文档没有提到的一件事是allwrite clientspec属性,它将工作目录中的所有文件标记为可写,而不是仅标记已检出的文件。

#3


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.

为了完整起见:有一个名为P4VS的新工具。我更喜欢那个从未为我工作过的P4SCC。

#1


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

在您的情况下,我建议不要使用Perforce的visual studio集成。

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

您可以将Perforce命令添加到“工具”菜单,或者尝试使用Google的Nifty Perforce:

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

#2


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,就好像您与服务器断开连接并稍后协调您的更改,而不是在执行之前告诉Perforce您执行的所有操作。 (这大致相当于CVS或Subversion中的工作流程。)您可以同步您的工作副本,进行开发,然后让Perforce弄清楚您在不看的时间做了什么。

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

Perforce有一个很好的文档描述了这个过程:与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.

文档没有提到的一件事是allwrite clientspec属性,它将工作目录中的所有文件标记为可写,而不是仅标记已检出的文件。

#3


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.

为了完整起见:有一个名为P4VS的新工具。我更喜欢那个从未为我工作过的P4SCC。