2012-01-12 2 views
1

나는 수은 저장소를 가지고 있습니다. .hgignore 파일이 있습니다 :Mercurial은 지정된 디렉토리의 파일을 무시하지 않습니다.

λ ~/workspace/kompgrafika/nurbs/ cat .hgignore 
syntax: regexp 
^Makefile 
^bin/.*$ 
CMakeFiles/.*$ 
^CMakeCache\.txt 
^cmake_install\.cmake 

내가 무시하려는 디렉토리의 이름 CMakeFiles이있다 :

λ ~/workspace/kompgrafika/nurbs/ tree CMakeFiles 
CMakeFiles 
├── 3dfractals.dir 
│   ├── build.make 
│   ├── cmake_clean.cmake 
│   ├── CXX.includecache 
│   ├── DependInfo.cmake 
│   ├── depend.internal 
│   ├── depend.make 
│   ├── flags.make 
│   ├── link.txt 
│    ├── progress.make 
│   └── src 
│    ├── DisplayControl.cpp.o 
│    ├── Drawer.cpp.o 
│    ├── main.cpp.o 
│    ├── PointFileReader.cpp.o 
│    ├── PointGenerator.cpp.o 
│    └── Program.cpp.o 
├── CMakeCCompiler.cmake 
├── cmake.check_cache 
├── CMakeCXXCompiler.cmake 
├── CMakeDetermineCompilerABI_C.bin 
├── CMakeDetermineCompilerABI_CXX.bin 
├── CMakeDirectoryInformation.cmake 
├── CMakeOutput.log 
├── CMakeSystem.cmake 
├── CMakeTmp 
│   └── CMakeFiles 
│    └── cmTryCompileExec.dir 
├── CompilerIdC 
│   ├── a.out 
│   └── CMakeCCompilerId.c 
├── CompilerIdCXX 
│   ├── a.out 
│   └── CMakeCXXCompilerId.cpp 
├── Makefile2 
├── Makefile.cmake 
├── progress.marks 
└── TargetDirectories.txt 

7 디렉토리, 파일 31 건

그러나 hg status를 실행하는 것이 3dfractals.dir 무시하지 않습니다 몇 가지 이유.

λ ~/workspace/kompgrafika/nurbs/ hg st 
A .hgignore 
A docs/pol_10.wings 
? CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o 
? CMakeFiles/3dfractals.dir/src/Drawer.cpp.o 
? CMakeFiles/3dfractals.dir/src/PointFileReader.cpp.o 
? CMakeFiles/3dfractals.dir/src/PointGenerator.cpp.o 
? CMakeFiles/3dfractals.dir/src/Program.cpp.o 
? CMakeFiles/3dfractals.dir/src/main.cpp.o 

내가 사용하고 있습니다 :

λ ~/workspace/kompgrafika/nurbs/ hg --version 
Mercurial Distributed SCM (version 2.0.2+5-1f9f9b4c2923) 
(see http://mercurial.selenic.com for more information) 

Copyright (C) 2005-2011 Matt Mackall and others 
This is free software; see the source for copying conditions. There is NO 
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

가 나는 또한 ^CMakeFiles$CMakeFiles/.*$을 변경했습니다. 결과가 없습니다.

어떤 아이디어가 잘못 되었나요?

답변

1

흠, 그것은 여기에 작품 :

$ cat .hgignore 
syntax:regexp 
^Makefile 
^bin/.*$ 
CMakeFiles/.*$ 
^CMakeCache\.txt 
^cmake_install\.cmake 
$ hg init 
$ mkdir -p $(dirname CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o) 
$ touch CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o 
$ touch CMakeFiles/cmake.check_cache 
$ hg status 
? .hgignore 
$ hg status -A 
? .hgignore 
I CMakeFiles/3dfractals.dir/src/DisplayControl.cpp.o 
I CMakeFiles/cmake.check_cache 

이것은 Mercurial 2.0.2 + 59와 동일하므로 버전과 동일하게 작동해야합니다.

당신이 보는 방식으로 hg status을 올릴 수있는 한 가지는 inotify extension입니다. 그것의 위키 페이지에서 언급했듯이, 그것은 still buggy이기 때문에 여전히 실험적인 것으로 간주됩니다.

$ hg showconfig extensions.inotify 

으로 이의 제기를 확인하고 필요하면 비활성화하십시오. 확장 파일이 자신의 구성 파일에서로드 된 경우 (hg showconfig --debug에 확인)로드하는 행을 제거하면됩니다. 변경이 불가능한 시스템 전체 설정 파일에로드 된 경우

[extensions] 
inotify = ! 

을 사용하지 않도록 설정 파일에 추가하십시오.

+0

나는'rm -rf CMakeFiles'를 만들고 make (그 dir을 다시 생성하기 위해). 그런 다음'hg status'를 실행하면 디렉토리가 목록에서 사라집니다. 어떤 종류의 캐시 버그? –

+0

Nah, should not - '.hgignore' 파일에 대한 정보를 캐시하지 않습니다. 'hg showconfig extensions'는 우연히'inotify '를 언급합니까? 이것은 방금 본 상황을 만들기 위해 상황을 망칠 수도있는 파일 시스템 모니터 확장입니다. –

+0

예. 해당 확장 프로그램을 제거하면 문제가 해결되는 것 같습니다. –

0
내가 윈도우에있어

, 그러나 보통

CMakeFiles/*

나를 위해 트릭을 할 것입니다 ...

+0

구문 : glob CMakeFiles/*'트릭을 수행하지 않습니다. –

+0

'CMAkeFiles /'는 어떨까요? –