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

Side by Side Diff: buildspec_to_git.py

Issue 316963004: Tighten match for the chromium 'src' repo. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/deps2git
Patch Set: Created 6 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 """Public buildspec to GIT mapping.""" 5 """Public buildspec to GIT mapping."""
6 6
7 import re 7 import re
8 from deps2git import SplitScmUrl 8 from deps2git import SplitScmUrl
9 9
10 GIT_HOST = 'https://chromium.googlesource.com/' 10 GIT_HOST = 'https://chromium.googlesource.com/'
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 def SvnUrlToGitUrl(path, svn_url): 121 def SvnUrlToGitUrl(path, svn_url):
122 """Convert a chromium SVN URL to a chromium Git URL.""" 122 """Convert a chromium SVN URL to a chromium Git URL."""
123 123
124 match = re.match( 124 match = re.match(
125 '(https?://src.chromium.org/svn|svn://svn.chromium.org/chrome)(/.*)', 125 '(https?://src.chromium.org/svn|svn://svn.chromium.org/chrome)(/.*)',
126 svn_url) 126 svn_url)
127 if match: 127 if match:
128 svn_url = match.group(2) 128 svn_url = match.group(2)
129 129
130 # Handle the main 'src' repo which only appears in buildspecs. 130 # Handle the main 'src' repo which only appears in buildspecs.
131 match = re.match('/(branches/(?P<branch>[^/]+)|trunk)/src', svn_url) 131 match = re.match('/(branches/(?P<branch>[^/]+)|trunk)/src^', svn_url)
szager1 2014/06/04 22:42:51 Should that be '$'?
Michael Moss 2014/06/04 22:44:38 UGH. Yes.
132 if match: 132 if match:
133 if match.groupdict().get('branch'): 133 if match.groupdict().get('branch'):
134 return (path, GIT_HOST + 'chromium/src.git', GIT_HOST, 134 return (path, GIT_HOST + 'chromium/src.git', GIT_HOST,
135 match.groupdict().get('branch')) 135 match.groupdict().get('branch'))
136 else: 136 else:
137 return (path, GIT_HOST + 'chromium/src.git', GIT_HOST) 137 return (path, GIT_HOST + 'chromium/src.git', GIT_HOST)
138 138
139 # libvpx branches in the chrome branches area. 139 # libvpx branches in the chrome branches area.
140 match = re.match('/branches/libvpx/(?P<branch>[^/]+)', svn_url) 140 match = re.match('/branches/libvpx/(?P<branch>[^/]+)', svn_url)
141 if match: 141 if match:
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 if match.group('path'): 224 if match.group('path'):
225 repo = GIT_HOST + 'chromium/blink-public.git' 225 repo = GIT_HOST + 'chromium/blink-public.git'
226 else: 226 else:
227 repo = GIT_HOST + 'chromium/blink.git' 227 repo = GIT_HOST + 'chromium/blink.git'
228 return (path, repo, GIT_HOST, match.group('branch')) 228 return (path, repo, GIT_HOST, match.group('branch'))
229 229
230 # reference builds 230 # reference builds
231 if svn_url.startswith('/trunk/deps/reference_builds/chrome'): 231 if svn_url.startswith('/trunk/deps/reference_builds/chrome'):
232 return (path, GIT_HOST + 'chromium/reference_builds/chrome.git', 232 return (path, GIT_HOST + 'chromium/reference_builds/chrome.git',
233 GIT_HOST) 233 GIT_HOST)
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