title: Bamboo: Using a newly created Tag/Branch in checkout tasks at later stages in the plan
body: <p>I am trying to create a build plan which has a VCS Tagging(or VCS Branching) task in its first stage, and then at later stages uses the newly created tag(or branch) to checkout code from it(repository is SVN).</p>
  
  <p>I use a plan variable for the tag/branch name - <code>${bamboo.repoBranch}</code> - and this variable is also used in the repository URL. I understand that this URL would not be valid until the tagging/branching task is executed, but tasks that try to checkout from that URL are at later stages.</p>
  
  <p>From what I understand, there is something like a code change detection phase, during which Bamboo checks all defined repositories for changes(no matter the order they are referenced in the plan or even if they are not used in the plan at all). I think this is the reason my approach doesn't work, is that correct? </p>
  
  <p>Here is the exception I get:</p>
  
  <pre><code>com.atlassian.bamboo.repository.InvalidRepositoryException: svn:
  
  at 
  
  com.atlassian.bamboo.repository.svn.SvnRepository.detectCommitsForUrl(SvnRepository.java:527)
  
  at 
  
  com.atlassian.bamboo.repository.svn.SvnRepository.collectChangesSinceLastBuild(SvnRepository.java:278)
  </code></pre>
  
  <p>Another alternative to what I am trying to achieve is to have a plan that creates a tag/branch and a child plan of that plan which uses the newly created tag/branch. The problem with this is that plan variables cannot be passed to child plans - I want to use Run Customized to override the value for <code>${bamboo.repoBranch}</code> and the overridden value to be passed to the child plan. From what I've read the workaround for this is to use a script task which using the Bamboo REST API queues the next plan for execution, but this seems a not very elegant solution.</p>
  
  <p>Any other approaches for what I am trying to achieve will be helpful.</p>
  
  <p>Thanks</p>