相当于在 Mercurial 中使用 TFS/MS SS 从文件中删除只读
有没有办法让 Mercurial 将文件视为与源代码控制副本匹配,即使它已被更改?这是使用 Team Foundation Server / Source Safe 实现的一个简单技巧,只需通过资源管理器使文件可写,就会使这些系统在签入时忽略该文件。
(请注意,这是一个已签入并具有值的文件,但有时每个开发人员都不同,请考虑连接字符串)
Is there a way to make Mercurial treat a file as if it matches the source control copy even if it has been altered? This was an easy trick to do with Team Foundation Server / Source Safe where just making the file writable through explorer would make those systems ignore that file on check ins.
(Note this is a file that is checked in and has a value but is sometimes different per developer, think connection strings)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 hgrc 中为排除的提交命令定义别名您不想在提交中跟踪的文件。
hgrc 参考资料说您可以定义与现有命令同名的别名;我发现它适用于
hg status
但不适用于hg commit
。我发现 .hgignore 不遵守存储库中已有文件的条目,因此这不是一个选项。
Define aliases in your hgrc for the commit command that excludes the file you don't want to track in the commit.
The hgrc reference says that you can define aliases with the same name as existing commands; I found that it worked for
hg status
but not forhg commit
.I found that .hgignore doesn't obey entries for files that are already in the repository so that's not an option.