Visual Studio 在哪里保存 SCM 相关信息?

发布于 2024-08-03 07:20:23 字数 533 浏览 3 评论 0原文

我正在使用 Visual Studio (2005) + Perforce 组合来实现特定解决方案,并且我想手动修改 Perforce 参数(客户端名称)。

从 VS 的“Change Source Control”对话框来看,SCM 信息似乎是按项目保存的;但是,.csproj.vspscc 文件似乎不包含任何与 Perforce 相关的信息,.vssscc 也不包含。

.vspscc 文件如下所示:

""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

最后一行表明 SCM 设置存储在外部,但是存储在哪里?

I'm using a Visual Studio (2005) + Perforce combination for a particular solution, and I'd like to manually modify a Perforce parameter (the client name).

From VS's "Change Source Control" dialog it seems that SCM info is saved per-project; however, the .csproj.vspscc files don't seem to hold any Perforce-related information, and neither does .vssscc

Here's how a .vspscc file looks like:

""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

The last line suggests the SCM settings are stored externally, but where?

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

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

发布评论

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

评论(3

看春风乍起 2024-08-10 07:20:23

对于本地工作副本,Perforce 将连接信息存储在 MSSCCPRJ.SCC 文件中。它看起来像这样:

SCC = This is a source code control file

[Solution1.sln]
SCC_Aux_Path = "P4SCC#<host>:<port>##<user>##<client hostname>"
SCC_Project_Name = Perforce Project

[Project1.csproj]
SCC_Aux_Path = "P4SCC#<host>:<port>##<user>##<client hostname>"
SCC_Project_Name = Perforce Project

.sln 文件中还有一些信息可以在用户之间传递,可能是出于遗留原因。如果 MSSCCPRJ.SCC 文件不可用,则可以使用此方法。

P4 使用或忽略这些设置的程度取决于它们的实现。

For your local working copy, Perforce stores the connection info in the MSSCCPRJ.SCC file. It looks like this:

SCC = This is a source code control file

[Solution1.sln]
SCC_Aux_Path = "P4SCC#<host>:<port>##<user>##<client hostname>"
SCC_Project_Name = Perforce Project

[Project1.csproj]
SCC_Aux_Path = "P4SCC#<host>:<port>##<user>##<client hostname>"
SCC_Project_Name = Perforce Project

There is also some information in the .sln file that can carry over between users, possibly for legacy reasons. This may be used if the MSSCCPRJ.SCC file is unavailable.

How much P4 uses or ignores those settings are dependant on their implementation.

烦人精 2024-08-10 07:20:23

请注意,您可以设置 P4CLIENT 环境变量来告诉 Perforce 您要使用哪个客户端;这并不能完全回答您的问题,但也许这是解决您问题的另一种方法。

另外,如果您使用 Visual Studio 进行 Perforce,您可以查看 NiftyPerforce 插件 ( http://code.google.com/p/niftyplugins/wiki/NiftyPerforceDocumentation),我一直觉得它比 Perforce 的好一点。

Note you can set the P4CLIENT environment variable to tell Perforce what client you want to use; this doesn't quite answer your question but maybe it's another way to solve your problem.

Also, if you're doing Perforce with Visual Studio, you might check out the NiftyPerforce plugin (http://code.google.com/p/niftyplugins/wiki/NiftyPerforceDocumentation), which I've always found a little nicer than the one from Perforce.

他夏了夏天 2024-08-10 07:20:23

在文本编辑器上打开 vcproj 文件并找到以 Scc 开头的条目(SccProjectName、SccAuxPath、SccLocalPath、SccProvider...)。这些条目定义了项目的 SCC 绑定。

例如,由 Source Safe 控制的项目如下所示:

SccProjectName=""$/Services". TPCAAAAA"
SccLocalPath=".."
SccProvider="MSSCCI:Microsoft Visual SourceSafe"

由 SVN 控制的项目看起来如下:

SccProjectName="Svn"
SccAuxPath="Svn"
SccLocalPath="Svn"
SccProvider="SubversionScc"

sln 文件具有您可以检查的类似条目

Open vcproj file on a text editor and locate entries starting with Scc (SccProjectName, SccAuxPath, SccLocalPath, SccProvider...). These entries define the SCC binding of the project.

As an example, a project controlled by Source Safe looks like this:

SccProjectName=""$/Services". TPCAAAAA"
SccLocalPath=".."
SccProvider="MSSCCI:Microsoft Visual SourceSafe"

A project controlled by SVN looks line this:

SccProjectName="Svn"
SccAuxPath="Svn"
SccLocalPath="Svn"
SccProvider="SubversionScc"

sln files have similar entries that you can check

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