我有mercurial存储库。有.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$
。没有结果。
任何想法有什么不对?
答案 0 :(得分: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
就像你看到的$ hg showconfig extensions.inotify
一样。如其维基页面所述,它仍然被认为是实验性的,因为它是inotify extension。用
hg showconfig --debug
并在必要时禁用它。如果从您自己的配置文件加载扩展(使用[extensions]
inotify = !
检查),则可以删除加载它的行。如果它被加载到您无法更改的系统范围的配置文件中,则添加
{{1}}
到您自己的配置文件中以禁用它。
答案 1 :(得分:0)
我在Windows上,但通常是
CMakeFiles / *
会为我做伎俩...