.hgignore不适合我

时间:2011-03-09 16:06:25

标签: mercurial

我正在尝试为项目设置.hgignore。 .hgignore文件位于.hg文件旁边的项目根目录中。状态的输出如下,我想忽略sdcard.cydsn \ ARM_GCC_441 \ Debug和sdcard.cydsn \ codegentemp目录中的所有文件。我尝试了前进/后退斜线和通配符的各种组合,但无法使其工作。有什么建议吗?

C:\sdcard>hg st
M sdcard.cydsn\ARM_GCC_441\Debug\Clock_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\Clock_2.lst
M sdcard.cydsn\ARM_GCC_441\Debug\Cm3Start.lst
M sdcard.cydsn\ARM_GCC_441\Debug\Control_Reg_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CyDmac.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CyFlash.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CyLib.lst
M sdcard.cydsn\ARM_GCC_441\Debug\CySpc.lst
M sdcard.cydsn\ARM_GCC_441\Debug\SPIM_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\SPIM_1_INT.lst
M sdcard.cydsn\ARM_GCC_441\Debug\SPIM_1_PM.lst
M sdcard.cydsn\ARM_GCC_441\Debug\TX.lst
M sdcard.cydsn\ARM_GCC_441\Debug\UART_1.lst
M sdcard.cydsn\ARM_GCC_441\Debug\UART_1_INT.lst
M sdcard.cydsn\ARM_GCC_441\Debug\UART_1_PM.lst
M sdcard.cydsn\ARM_GCC_441\Debug\clk.lst
M sdcard.cydsn\ARM_GCC_441\Debug\core_cm3.lst
M sdcard.cydsn\ARM_GCC_441\Debug\cyPm.lst
M sdcard.cydsn\ARM_GCC_441\Debug\cyfitter_cfg.lst
M sdcard.cydsn\ARM_GCC_441\Debug\cyutils.lst
M sdcard.cydsn\ARM_GCC_441\Debug\ff.lst
M sdcard.cydsn\ARM_GCC_441\Debug\main.lst
M sdcard.cydsn\ARM_GCC_441\Debug\miso.lst
M sdcard.cydsn\ARM_GCC_441\Debug\mmc.lst
M sdcard.cydsn\ARM_GCC_441\Debug\mosi.lst
M sdcard.cydsn\ARM_GCC_441\Debug\sdcard.a
M sdcard.cydsn\ARM_GCC_441\Debug\ss.lst
M sdcard.cydsn\codegentemp\lcpsoc3\index
M sdcard.cydsn\codegentemp\sdcard.ctl
M sdcard.cydsn\codegentemp\sdcard.cyfit
M sdcard.cydsn\codegentemp\sdcard.rpt
M sdcard.cydsn\codegentemp\sdcard.v
M sdcard.cydsn\codegentemp\sdcard.vh2
M sdcard.cydsn\codegentemp\sdcard_timing.xml
M sdcard.cydsn\sdcard.cyfit
M sdcard.cydsn\sdcard.cyprj
M sdcard.cydsn\sdcard.cyprj.sean
M sdcard.cydsn\sdcard.rpt
M sdcard.cywrk
M sdcard.cywrk.sean
? .hgignore

2 个答案:

答案 0 :(得分:13)

如果您在执行

后已经跟踪了文件

hg add .hgignore

您需要forget您不想再追踪的文件。 .hgignore无法获取您正在跟踪的忽略文件。

答案 1 :(得分:1)

您需要将忽略文件添加到存储库。即:

hg add .hgignore

忽略文件的版本与任何其他文件一样,只是hg工具为其内容添加了特殊含义。