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

Unified Diff: tools/safely-roll-deps.py

Issue 271733007: Make safely-roll-deps work with git commit hashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update regexp Created 6 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/safely-roll-deps.py
diff --git a/tools/safely-roll-deps.py b/tools/safely-roll-deps.py
index 2f1e490764fbae1080fe422315143f7c8b700ad4..0e75715c32299d97a37b39b1850b3214b64ddbfb 100755
--- a/tools/safely-roll-deps.py
+++ b/tools/safely-roll-deps.py
@@ -33,8 +33,8 @@ def process_deps(path, project, new_rev, is_dry_run):
# Hack for Blink to get the AutoRollBot running again.
if project == "blink":
project = "webkit"
- old_line = r'(\s+)"%s_revision": "(\d+)",' % project
- new_line = r'\1"%s_revision": "%d",' % (project, new_rev)
+ old_line = r'(\s+)"%s_revision": "([0-9a-f]{2,40})",' % project
+ new_line = r'\1"%s_revision": "%s",' % (project, new_rev)
new_content = re.sub(old_line, new_line, content, 1)
old_rev = re.search(old_line, content).group(2)
if not old_rev or new_content == content:
@@ -93,7 +93,7 @@ def main():
os.chdir(root_dir)
project = args[0]
- new_rev = int(args[1])
+ new_rev = args[1]
# Silence the editor.
os.environ['EDITOR'] = 'true'
@@ -126,8 +126,8 @@ def main():
prnt_subprocess.check_output(branch_cmd)
try:
- old_rev = int(process_deps(os.path.join(root_dir, 'DEPS'), project, new_rev,
- options.dry_run))
+ old_rev = process_deps(os.path.join(root_dir, 'DEPS'), project, new_rev,
+ options.dry_run)
print '%s roll %s:%s' % (project.title(), old_rev, new_rev)
review_field = 'TBR' if options.commit else 'R'
« 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