removing files from the repository without deleting those files

Bernd Schubert bs at q-leap.de
Wed Aug 29 07:53:00 CDT 2007


Hi,

I have suggested here to use mercurial to monitor /etc and /var on our
customer systems.

In principal this works fine, but some file we want to exclude, of course,
e.g. /etc/mtab.

Now lets assume I forgot to blacklist /etc/mtab and want to exclude it now.
So I added it to .hgignore, but of course it still monitored. So how can I
make mercurial to remove it from its 'monitored archive' (sorry don't know
how to express myself here properly)?
'hg remove' will entirely remove this file, but this is definitely not what
I want. I already tried 'hg remove --after', but it complains the file has
changed. So I tried 'hg remove --after --force', ouch, this deleted the
file.
My present only workaround is to 

mv /etc/mtab /etc/mtab.bak
hg remove --after /etc/mtab 
mv /etc/mtab.bak /etc/mtab 

Any better solution?

Thanks,
Bernd



More information about the Mercurial mailing list