Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merge default -> production

--HG--
branch : production-0.8
  • Loading branch information...
commit 248bbfda3dfad29c1e650d080826a20da6454466 2 parents 69a9bff + 75e35e9
@escapewindow escapewindow authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 process/factory.py
View
18 process/factory.py
@@ -4088,11 +4088,29 @@ def __init__(self, repositories, productName, appName, version, appVersion,
description=['update', repoName],
haltOnFailure=True
))
+
+ self.addStep(SetProperty(
+ command=['sh', '-c', 'hg branches | grep %s | wc -l' % repoRelbranchName],
+ property='branch_match_count',
+ workdir=repoName,
+ haltOnFailure=True,
+ ))
+
self.addStep(ShellCommand(
name='hg_branch',
command=['hg', 'branch', repoRelbranchName],
workdir=repoName,
description=['branch %s' % repoName],
+ doStepIf=lambda step: int(step.getProperty('branch_match_count')) == 0,
+ haltOnFailure=True
+ ))
+
+ self.addStep(ShellCommand(
+ name='switch_branch',
+ command=['hg', 'up', '-C', repoRelbranchName],
+ workdir=repoName,
+ description=['switch to', repoRelbranchName],
+ doStepIf=lambda step: int(step.getProperty('branch_match_count')) > 0,
haltOnFailure=True
))
# if buildNumber > 1 we need to switch to it with 'hg up -C'
Please sign in to comment.
Something went wrong with that request. Please try again.