Home
TeamSite
Exclusion of branches in available_templates.cfg?
edtmnjn
Hi,
I wonder if anyone has successfully used anchoring at the end ($) when specifying branches in the branch_list element? I just can't get it to work, I've tried most combinations I can think of but it never matches when there's a $ at the end of the regex.
Basically what I'm looking for is some way to exclude a workflow in specific branches, and not necessarily subbranches below that branch (that would be specified explicitly with another branch element).
For example, I need to exclude these exact branches:
/EMEA/main/Intranet/Inside/hub_inside/company/corporate
/EMEA/main/Intranet/Inside/hub_inside/company/corporate/marketing_organization
I figured a couple of regular expression that are anchored both at the beginning (^) and the end ($) would do it, like so:
^/EMEA/main/Intranet/Inside/hub_inside/company/corporate$
^/EMEA/main/Intranet/Inside/hub_inside/company/corporate/marketing_organization$
I would've expected those regular expressions to match only those two branches, but the match is never made. I've tried adding an additional forward-slash at the end of the branchname but with no success. I've also tried to skip the anchor at the beginning but that didn't do it either (not that strange since the ^ works when used on a branch without the $ at the end, but that would match all subbranches as well).
Below is an example of how I would expect it to work, when wanting to exclude the branch /EMEA/main/Intranet/Inside/hub_inside/company but not anything else:
<branch value="^/EMEA/main/Intranet/Inside/hub_inside/company$" include="no"/>
<branch value="^/EMEA/main/Intranet" include="yes"/>
Find more posts tagged with
Comments
edtmnjn
Okay, it turns out that the branch element doesn't match against a branch but rather a full workarea path, so when I changed the values to:
<branch value="/EMEA/main/Intranet/Inside/hub_inside/company/corporate/WORKAREA/.*" include="no"/>
<branch value="/EMEA/main/Intranet/Inside/hub_inside/company/corporate/marketing_organization/WORKAREA/.*" include="no"/>
It works as expected, i.e. the branches are excluded and not the subbranches.
~peter
Duplicate_Inv.jpg