Visual Studios 2008 中的 Perforce 问题
我的团队使用 Visual Studios 2008 来开发 SSIS 包,并使用 Perforce 作为我们的源代码控制系统。 当用户将文件添加到项目时,该项目会自动检出,而不检查它是否是当前版本。 有没有办法强制 Visual Studio 在签出文件之前获取该文件的最新版本?
我们通常确定这种情况是在 Visual Studio 中文件“丢失”后发生的。 通常会发生以下情况:
- 用户 A 将文件添加到项目中。
- 用户 A 签入项目和新文件。
- 用户 B 签出项目但未获取最新版本
- 用户 B 添加文件。
- 用户 B 签入项目和新文件。
- 用户 A 获取最新的项目定义并注意到他们的文件“丢失”。
作为预防措施,我要求我的团队成员在添加文件之前立即获取最新的项目定义。 尽管采取了这种预防措施,错误仍然发生并且文件“消失”。 尽管我们可以手动从 Perforce 检索它们并将它们添加回项目定义中,但我们根本不必经历这种痛苦。 我知道 Perforce 可以自动检测文件的更改。 当您选择撤消签出时,Perforce 将自动将您的本地副本与服务器版本进行比较,如果检测到差异,则替换本地版本。 必须有一种方法强制它在允许像 VSS 一样检出文件之前进行检查。 当我的开发人员告诉我他们想回到 VSS 时,我感到很难过。
My team uses Visual Studios 2008 to develop SSIS packages and we use Perforce as our source control system. When a user adds a file to a project, the project is automatically checked out WITHOUT checking to see if it is the current version. Is there a way to force Visual Studios to get the latest version of a file before it is checked out?
We usually determine this happened after files go "missing" in Visual Studios. Here's what usually happens:
- User A adds a file to the project.
- User A checks in both the project and the new file.
- User B checks out the project without getting the latest version
- User B adds a file.
- User B checks in both the project and the new file.
- User A gets the latest project definition and notices their file is "missing".
As a preventative measure I require my team members to get the latest project definition immediately before adding files. Despite this precaution, mistakes continue to happen and the files "disappear". Although we can retrieve them from Perforce manually and add them back to the project definition, we shouldn't have to go through this pain at all. I know Perforce can detect changes to files automatically. Perforce will automatically compare your local copy to the server version and replace the local version if it detects a difference when you select undo check-out. There has to be a way to force it to check BEFORE it allows the file to be checked-out like VSS. It's sad when my developers tell me they WANT to go back to VSS.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是与 P4SCC 和 Visual Studio 一起使用的“共享”工作区客户端的问题。 工作区客户端对于每个用户和机器来说应该是唯一的——Perforce 使用工作区客户端来跟踪特定机器工作区的内容。
以下是当两个用户使用同一工作区客户端时发生的情况:
用户 A 和 B 都强制同步到
最新修订使用
“standard_1”客户端。 有表
在服务器上更新,注意到
项目“foo”的版本为#12。
用户 B 签出“foo”,添加一个文件,
并提交。 现在有表是
更新并注意到项目“foo”
位于 standard_1 的修订版 #13
,
用户 A 现在签出项目“foo”,
添加一个文件,然后提交——没有
冲突——作为修订#14
standard_1 工作区,因为
Perforce 认为工作空间
已经有 #13。
解决方案是确认每个用户都有一个对其计算机而言唯一的工作区客户端规范。 这将分隔每个用户工作区的列表,并且编辑时的警告和签入时的冲突每次都会起作用。
This could be an issue with a "shared" workspace client being used with P4SCC and Visual Studio. Workspace clients should be unique to each user and machine -- Perforce uses the workspace client to track the contents of a specific machine's workspace.
Here's how it happens when both users are using the same workspace client:
Both Users A and B force sync to the
latest revisions using the
"standard_1" client. The have table
is updated on the server, noting that
project "foo" is at revision #12.
User B checks out "foo", adds a file,
and submits. Now the have table is
updated and notes that project "foo"
is at revision #13 in the standard_1
workspace.
User A now checks out project "foo",
adds a file, and submits -- without a
conflict -- as revision #14 in the
standard_1 workspace, because
Perforce thinks that workspace
already has #13.
The solution is to confirm that each user has a workspace client specification that is unique to their machine. This will separate the have lists for each user workspace, and the warning on edit and conflict on checking in will work every time.