开发者

Equivalent of removing readonly from a file with TFS/MS SS in Mercurial

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)


Define aliases in your hgrc for the commit command that excludes the file you don't want to track in the commit.

[alias]
xcommit=commit --exclude path/to/file
xstatus=status --exclude path/to/file

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 for hg commit.

I found that .hgignore doesn't obey entries for files that are already in the repository so that's not an option.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜