Ignoring the change in a file

Martin Geisler mg at lazybytes.net
Sat Aug 22 12:20:51 CDT 2009


jihocech <jihocech at gmail.com> writes:

> Hello, I've got several files in my web application (web.config and
> settings.xml in my case) that I need to change the contents of based
> on the local machine I am installed on. For example, one of the things
> in settings.xml is the path on the local machine to store attachments
> uploaded through the application.
>
> I'm looking for a way to tell mercurial that changes to a particular
> file aren't to be committed when I do my commits. I would like ask you
> if Mercurial has this feature? Thanks you in advance.

After we talked about this on IRC, I came to think of another solution:
you can use the -X option to 'hg commit' to exclude the files in
question. You'll have to do this on every commit or you can add it to
the [defaults] section of your hgrc file:

  http://www.selenic.com/mercurial/hgrc.5.html#defaults

I've not tried such a workflow myself -- please give it a try and let us
know if it works well.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20090822/2a791d7a/attachment.pgp 


More information about the Mercurial mailing list