2014-02-05 75 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-

相關問題