2

Possible Duplicate:
ignoring folders in mercurial

I'm trying to put together what I thought would be a simple ignore filter, but can't seem to get it working.

I have a /database directory in my code that contains files that change regularly and are not part of the source. I want that directory (and all the files inside of it) ignored by Mercurial.

How can I make this work?

I've tried adding the following:

^DATABASE/

and the database directory is not ignored.

C:\CDM_Dev\cdm>hg status
M .hgignore
M DATABASE\CDM001.MEM
M DATABASE\audittr.CDX
M DATABASE\audittr.DBF
M Program\librptte.FXP
M Program\libupdat.FXP
M Program\rpttenan.FXP

Any other ideas?

Community
  • 1
  • 1
Steve
  • 23
  • 3

1 Answers1

2

Your database files are already controlled by Mercurial, as the hg status output suggests. Mercurial ignore filter is not the same thing as Subversion's ignore on commit; that is, new files, should they appear under DATABASE/, will be ignored, but any existing files will continue to be monitored for changes.

If the files under DATABASE/ are not a part of the source, remove them from the control (hg forget DATABASE/*, then commit). They won't be appearing as unknowns anymore.

Helgi
  • 5,428
  • 1
  • 31
  • 48
  • Also, removing the final slash from `^DATABASE/` will optimize status operations quite a bit, depending on the size of the subdirectory tree. – C2H5OH May 30 '12 at 01:17