문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top