Perforce 与 Visual Studio 集成,无需将项目文件签入到 Perforce

发布于 2024-07-11 09:43:33 字数 450 浏览 6 评论 0原文

我正在开发一个大型源代码库(大约 15K 个文件),分解为大约 25 个项目。 我想将源代码保留在 perforce 中(并且正在为此评估 perforce),但由于设置的复杂性,我不可能将 Visual Studio 项目保留在源代码控制中,我知道理论上这个问题的答案是签入项目,但这是不可行的(我们最终会签入多个版本的 VS 的项目,另外还有每个版本的几个变体,相反,它们是自动生成的,并且此设置运行良好)。

有没有一种方法可以让 VS 在不将项目添加到 perforce 的情况下签出文件进行编辑,以避免用户必须转到 perforce 客户端并手动签出每个文件进行编辑? 或者(甚至更好)是否有一种方法可以让 VS 识别项目中的文件处于源代码管理之下,而不必将项目也添加到源代码控制中?

我知道我们还可以采取让每个用户提前检查编辑他们可能想要编辑的所有文件的策略,然后在提交更改之前恢复未修改的文件,采用这种方法是否会造成性能损失?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

拒绝两难 2024-07-18 09:43:33

对于您的情况,我建议不要使用 Perforce 的 Visual Studio 集成。

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

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

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/

是伱的 2024-07-18 09:43:33

一种选择是像与服务器断开连接一样使用 Perforce,并稍后协调您的更改,而不是在执行之前告诉 Perforce 您所做的一切。 (这大致相当于 CVS 或 Subversion 中的工作流程。)您将同步您的工作副本,继续开发,然后要求 Perforce 弄清楚您在不监视时做了什么。

Perforce 有一个很好的文档描述了这个过程: 与 Perforce 服务器断开连接

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

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.

油饼 2024-07-18 09:43:33

为了完整起见:有一个新工具可以满足您的愿望,名为 P4VS< /a>. 我更喜欢它 P4SCC 它从来没有为我工作通缉。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文