hgrc file modified when VCS is updated


We may be going about this the wrong way, so feel free to tell me if there's a better way.

We have build configuration with multiple VCS roots attached, and a custom directory defined. We are using this build to maintain up-to-date clones of the remote repositories in that custom directory. The local repos clones have things that have been added to the .hg/hgrc file (hooks, web). The problem we are seeing is that every time the repos are updated all of those changes in the hgrc file go away. All that remains in the file is:

%include teamcity

default = http://server.somewhere.com/scm/hg/parent/application

(FWIW, the new hgrc file is also missing the newline on the last line.)

Can I stop TC  from resetting this file, or is there a better way of doing what we are trying to do.Thanks.


Comment actions Permalink

Hello Mark,

Sorry for delay.
It's not recommended to use Custom checkout directory, Auto is recommended. See the section for more details. Why do you use custom directory?

Also you should not modify files in the checkout directory manually, because content of the checkout directory can be deleted by TeamCity under certain circumstances.

Comment actions Permalink


We were trying to keep copies of our master repository on a new server up-to-date with the original prior to moving the repository to that new server. We have made the switch, so it is no longer necessary to use the custom directory feature. Thanks for your reply.


Please sign in to leave a comment.