I use the following search expression to find all the heads which aren't closed in our mercurial repository:
head() and not closed() and not branch('default')
However, I have a convention to name feature branches as fb-(target-release)-(feature-name)
and I'd also like to filter for the named branches which contain fb
at the beginning of their name. Is this possible without piping the output to another application?
You can use regular expressions in the branch
expression. From hg help revset
:
"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:".
So to match fb-
at the beginning of the name:
head() and not closed() and not branch('default') and branch('re:^fb-')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With