我有水银存储库。有 .hgignore 文件:
λ ~/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$
. 没结果。
有什么想法有什么问题吗?