Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: infra/bots/recipe_modules/core/api.py

Issue 2484763002: Fix zero-padding in gerrit ref (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 # pylint: disable=W0201 6 # pylint: disable=W0201
7 7
8 8
9 import json 9 import json
10 import os 10 import os
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 self.update_repo(self.m.vars.checkout_root, pdfium) 109 self.update_repo(self.m.vars.checkout_root, pdfium)
110 110
111 # Run bot_update. 111 # Run bot_update.
112 gclient_cfg.got_revision_mapping['skia'] = 'got_revision' 112 gclient_cfg.got_revision_mapping['skia'] = 'got_revision'
113 checkout_kwargs = {} 113 checkout_kwargs = {}
114 checkout_kwargs['env'] = self.m.vars.default_env 114 checkout_kwargs['env'] = self.m.vars.default_env
115 115
116 # Hack the patch ref if necessary. 116 # Hack the patch ref if necessary.
117 if self.m.properties.get('patch_storage', '') == 'gerrit': 117 if self.m.properties.get('patch_storage', '') == 'gerrit':
118 if self.m.bot_update._issue and self.m.bot_update._patchset: 118 if self.m.bot_update._issue and self.m.bot_update._patchset:
119 self.m.bot_update._gerrit_ref = 'refs/changes/%d/%d/%d' % ( 119 self.m.bot_update._gerrit_ref = 'refs/changes/%s/%d/%d' % (
120 int(str(self.m.bot_update._issue)[-2:]), 120 str(self.m.bot_update._issue)[-2:],
121 self.m.bot_update._issue, 121 self.m.bot_update._issue,
122 self.m.bot_update._patchset, 122 self.m.bot_update._patchset,
123 ) 123 )
124 124
125 update_step = self.m.bot_update.ensure_checkout( 125 update_step = self.m.bot_update.ensure_checkout(
126 gclient_config=gclient_cfg, 126 gclient_config=gclient_cfg,
127 cwd=self.m.vars.checkout_root, 127 cwd=self.m.vars.checkout_root,
128 **checkout_kwargs) 128 **checkout_kwargs)
129 129
130 self.m.vars.got_revision = ( 130 self.m.vars.got_revision = (
131 update_step.presentation.properties['got_revision']) 131 update_step.presentation.properties['got_revision'])
132 132
133 if self.m.vars.need_chromium_checkout: 133 if self.m.vars.need_chromium_checkout:
134 self.m.gclient.runhooks(cwd=self.m.vars.checkout_root, 134 self.m.gclient.runhooks(cwd=self.m.vars.checkout_root,
135 env=self.m.vars.gclient_env) 135 env=self.m.vars.gclient_env)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698