我已经$HG_NODE
引用了我希望开始的变更集:
[vcs@Quake /tmp/test/advanced]$ hg log -r $HG_NODE: --template '{node|short}:{files}\n'
c5eefea063fd:1.txt backup.cmd notes.txt
370f9ef91471:1.txt backup.cmd notes.txt
5eac12f79df6:advanced/Program.cs advanced/a advanced/b advanced/notes.txt lab6/scratch2/Fiobonacci.sln lab6/scratch2/Program.cs lab6/scratch2/xxx lab6/scratch2/yyy
4be96f43f327:advanced/1.txt
c724950dd2a6:advanced/Fiobonacci.csproj advanced/aaa.kuku
现在,我还有一个目录,我特别感兴趣。因此,我希望从影响此目录中文件的起始变更集获取所有变更集。
首先,我尝试检查是否可以为特定文件获取它:
[vcs@Quake /tmp/test/advanced]$ hg log -r "$HG_NODE: and file('path:advanced/1.txt')" --template '{node|short}\n'
4be96f43f327
然后,对于该目录中的所有文件。但我似乎遗漏了一些东西:
[vcs@Quake /tmp/test/advanced]$ hg log -r "$HG_NODE: and file('path:advanced/**')" --template '{node|short}\n'
[vcs@Quake /tmp/test/advanced]$ hg log -r "$HG_NODE: and file('set:advanced/**')" --template '{node|short}\n'
abort: fileset expression with no context
[vcs@Quake /tmp/test/advanced]$ hg log -r "$HG_NODE: and file('glob:advanced/**')" --template '{node|short}\n'
[vcs@Quake /tmp/test/advanced]$ hg log -r "$HG_NODE: and file('advanced/**')" --template '{node|short}\n'
[vcs@Quake /tmp/test/advanced]$ hg log -r "$HG_NODE: and file('re:^advanced/.*')" --template '{node|short}\n'
5eac12f79df6
4be96f43f327
c724950dd2a6
只有re:
前缀对我有用,但这也应该适用glob:
。
我怎样才能使它与glob:
and一起工作**
?