开发者

Mercurial: How to overwrite files in a particular folder?

I am working on a new project with three other developers, we are all new to Mercurial.

A post build event is created in Visual Studio 2010 to copy DLLs to a common folder. Each time anyone commits or updates we want to rewrite without considering version or merging. Tha开发者_如何学Ct is, this particular folder overwrite local working copy on each update.

Is it possible?


The conventional wisdom is that you shouldn't be committing build products at all. You version source code not dlls. Those you download during build from your CI system.

That said, if they're all DLLs you can set a custom merger for those:

[merge-patterns]
 **.dll = internal:remote

That always uses the "other" version when there's a conflict on .dll files. More details here.


Perhaps mercurial hook is the answer.

It is possible to create post commit or post pull hook which will do some work, in this case copy files to common folder.

However, if you wish to copy file after each build, then mercurial is not the way. In that case, build tool should copy the necessary files.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜