Sandeep Kumar M
Sandeep Kumar M

Reputation: 3851

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. That is, this particular folder overwrite local working copy on each update.

Is it possible?

Upvotes: 1

Views: 575

Answers (2)

bbaja42
bbaja42

Reputation: 2169

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.

Upvotes: 0

Ry4an Brase
Ry4an Brase

Reputation: 78350

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.

Upvotes: 2

Related Questions