Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Bug 820245, followup tweaks for manifests, r=catlee
Browse files Browse the repository at this point in the history
  • Loading branch information
nthomas-mozilla committed Dec 13, 2012
1 parent 966d278 commit 1a415c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/b2g_build.py
Expand Up @@ -237,14 +237,15 @@ def query_revision(self):


def query_translated_revision(self, url, project, rev, attempts=5, sleeptime=15): def query_translated_revision(self, url, project, rev, attempts=5, sleeptime=15):
url = '%s/%s/git/%s' % (url, project, rev) url = '%s/%s/git/%s' % (url, project, rev)
self.info('Mapping revision from hg to git using %s' % url)
n = 1 n = 1
while n <= attempts: while n <= attempts:
try: try:
r = urllib2.urlopen(url, timeout=10) r = urllib2.urlopen(url, timeout=10)
j = json.loads(r.readline()) j = json.loads(r.readline())
return j['git_rev'] return j['git_rev']
except Exception, err: except Exception, err:
self.error('Error retrieving %s - %s' % (url, str(err))) self.warning('Error: %s' % str(err))
if n == attempts: if n == attempts:
self.fatal('Giving up') self.fatal('Giving up')
return 'null' return 'null'
Expand Down Expand Up @@ -397,7 +398,7 @@ def update_source_manifest(self):
gecko_config = self.load_gecko_config() gecko_config = self.load_gecko_config()
gaia_config = gecko_config.get('gaia') gaia_config = gecko_config.get('gaia')
manifest_config = self.config.get('manifest', {}) manifest_config = self.config.get('manifest', {})
branch = self.buildbot_config['properties'].get('branch') branch = self.query_branch()


sourcesfile = os.path.join(dirs['work_dir'], 'sources.xml') sourcesfile = os.path.join(dirs['work_dir'], 'sources.xml')
sourcesfile_orig = sourcesfile + '.original' sourcesfile_orig = sourcesfile + '.original'
Expand Down Expand Up @@ -805,7 +806,7 @@ def upload_source_manifest(self):
self.info("Not a nightly build. Skipping...") self.info("Not a nightly build. Skipping...")
return return
manifest_config = self.config.get('manifest') manifest_config = self.config.get('manifest')
branch = self.buildbot_config['properties'].get('branch') branch = self.query_branch()
if not manifest_config or not branch: if not manifest_config or not branch:
self.info("No manifest config or can't get branch from build. Skipping...") self.info("No manifest config or can't get branch from build. Skipping...")
return return
Expand Down

0 comments on commit 1a415c1

Please sign in to comment.