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

Side by Side Diff: Tools/Scripts/webkitpy/w3c/deps_updater.py

Issue 1164833003: update-w3c-deps: Fix a bug of wrong revisions in a CL description (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Focus on the message issue Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« 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 """Pull latest revisions of the W3C test repos and update our DEPS entries.""" 5 """Pull latest revisions of the W3C test repos and update our DEPS entries."""
6 6
7 import argparse 7 import argparse
8 8 import re
9 9
10 from webkitpy.common.webkit_finder import WebKitFinder 10 from webkitpy.common.webkit_finder import WebKitFinder
11 11
12 12
13 class DepsUpdater(object): 13 class DepsUpdater(object):
14 def __init__(self, host): 14 def __init__(self, host):
15 self.host = host 15 self.host = host
16 self.executive = host.executive 16 self.executive = host.executive
17 self.fs = host.filesystem 17 self.fs = host.filesystem
18 self.finder = WebKitFinder(self.fs) 18 self.finder = WebKitFinder(self.fs)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 if self.fs.exists(self.path_from_webkit_base('csswg-test')): 72 if self.fs.exists(self.path_from_webkit_base('csswg-test')):
73 self.print_('## csswg-test repo exists, aborting') 73 self.print_('## csswg-test repo exists, aborting')
74 return False 74 return False
75 75
76 return True 76 return True
77 77
78 def update(self, repo, url): 78 def update(self, repo, url):
79 self.print_('## cloning %s' % repo) 79 self.print_('## cloning %s' % repo)
80 self.cd('') 80 self.cd('')
81 self.run(['git', 'clone', url]) 81 self.run(['git', 'clone', url])
82 self.cd(re.compile('.*/([^/]+)\.git').match(url).group(1))
82 83
83 self.print_('## noting the revision we are importing') 84 self.print_('## noting the revision we are importing')
84 master_commitish = self.run(['git', 'show-ref', 'origin/master'])[1].spl it()[0] 85 master_commitish = self.run(['git', 'show-ref', 'origin/master'])[1].spl it()[0]
85 86
86 self.print_('## cleaning out tests from LayoutTests/imported/%s' % repo) 87 self.print_('## cleaning out tests from LayoutTests/imported/%s' % repo)
87 dest_repo = self.path_from_webkit_base('LayoutTests', 'imported', repo) 88 dest_repo = self.path_from_webkit_base('LayoutTests', 'imported', repo)
88 files_to_delete = self.fs.files_under(dest_repo, file_filter=self.is_not _baseline) 89 files_to_delete = self.fs.files_under(dest_repo, file_filter=self.is_not _baseline)
89 for subpath in files_to_delete: 90 for subpath in files_to_delete:
90 self.remove('LayoutTests', 'imported', subpath) 91 self.remove('LayoutTests', 'imported', subpath)
91 92
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 dest = self.path_from_webkit_base(*comps) 179 dest = self.path_from_webkit_base(*comps)
179 if self.verbose: 180 if self.verbose:
180 self.print_('rm -fr %s' % dest) 181 self.print_('rm -fr %s' % dest)
181 self.fs.rmtree(dest) 182 self.fs.rmtree(dest)
182 183
183 def path_from_webkit_base(self, *comps): 184 def path_from_webkit_base(self, *comps):
184 return self.finder.path_from_webkit_base(*comps) 185 return self.finder.path_from_webkit_base(*comps)
185 186
186 def print_(self, msg): 187 def print_(self, msg):
187 self.host.print_(msg) 188 self.host.print_(msg)
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