2014-02-05 101 views
5

我用下面的搜索表达式查找所有未在我们的Mercurial库闭头:如何在mercurial中过滤具有部分名称匹配的命名分支?

head() and not closed() and not branch('default') 

不过,我有一个约定来命名特征分支机构fb-(target-release)-(feature-name),我也想过滤对于名称分别为fb的名称。这可能没有管道输出到另一个应用程序?

回答

6

您可以在branch表达式中使用正则表达式。从hg help revset

head() and not closed() and not branch('default') and branch('re:^fb-') 

"branch(string or set)" 
    All changesets belonging to the given branch or the branches of the 
    given changesets. 

    If "string" starts with "re:", the remainder of the name is treated as a 
    regular expression. To match a branch that actually starts with "re:", 
    use the prefix "literal:". 

所以要在名称的开头匹配fb-

相关问题