OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """SVN to GIT mapping for the public Chromium repositories.""" | 6 """SVN to GIT mapping for the public Chromium repositories.""" |
7 | 7 |
8 import re | 8 import re |
9 | 9 |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 if svn_url == 'svn://svn.chromium.org/gsutil/trunk/src': | 55 if svn_url == 'svn://svn.chromium.org/gsutil/trunk/src': |
56 return (path, GIT_HOST + 'external/gsutil/src.git', GIT_HOST) | 56 return (path, GIT_HOST + 'external/gsutil/src.git', GIT_HOST) |
57 | 57 |
58 if svn_url == 'svn://svn.chromium.org/jsoncpp/trunk/jsoncpp': | 58 if svn_url == 'svn://svn.chromium.org/jsoncpp/trunk/jsoncpp': |
59 return (path, GIT_HOST + 'external/jsoncpp/jsoncpp.git', GIT_HOST) | 59 return (path, GIT_HOST + 'external/jsoncpp/jsoncpp.git', GIT_HOST) |
60 | 60 |
61 if svn_url == '/trunk/deps/cdm': | 61 if svn_url == '/trunk/deps/cdm': |
62 return (path, GIT_HOST + 'chromium/cdm.git', GIT_HOST) | 62 return (path, GIT_HOST + 'chromium/cdm.git', GIT_HOST) |
63 | 63 |
64 # TODO(niklase) Remove after landing https://codereview.chromium.org/86563002 | 64 match = re.match('^https?://webrtc.googlecode.com/svn/(deps|trunk)/(.*)', |
65 if re.match('^https?://webrtc.googlecode.com/svn/stable/webrtc$', svn_url): | 65 svn_url) |
66 return (path, GIT_HOST + 'external/webrtc/stable/webrtc.git', GIT_HOST) | |
67 | |
68 # TODO(niklase) Remove after landing https://codereview.chromium.org/86563002 | |
69 if re.match('^https?://webrtc.googlecode.com/svn/stable/talk$', svn_url): | |
70 return (path, GIT_HOST + 'external/webrtc/stable/talk.git', GIT_HOST) | |
71 | |
72 # TODO(niklase) Remove after landing https://codereview.chromium.org/86563002 | |
73 if re.match('^https?://webrtc.googlecode.com/svn/stable/src$', svn_url): | |
74 return (path, GIT_HOST + 'external/webrtc/stable/src.git', GIT_HOST) | |
75 | |
76 # webrtc 'trunk/src' mirror was created without 'trunk' in the name, unlike | |
77 # the other ones which are matched next. | |
78 match = re.match('^https?://webrtc.googlecode.com/svn/trunk/src', svn_url) | |
79 if match: | 66 if match: |
80 return (path, GIT_HOST + 'external/webrtc/src.git', GIT_HOST) | 67 repo = '%s.git' % match.group(2) |
81 | 68 return (path, GIT_HOST + 'external/webrtc/%s/%s' % (match.group(1), repo), |
82 # webrtc 'trunk' mappings for everything but 'trunk/src'. | |
83 match = re.match('^https?://webrtc.googlecode.com/svn/trunk/(.*)', svn_url) | |
84 if match: | |
85 repo = '%s.git' % match.group(1) | |
86 return (path, GIT_HOST + 'external/webrtc/trunk/%s' % repo, GIT_HOST) | |
87 | |
88 if re.match('^https?://webrtc.googlecode.com/svn/deps/third_party/openmax$', | |
89 svn_url): | |
90 return (path, GIT_HOST + 'external/webrtc/deps/third_party/openmax.git', | |
91 GIT_HOST) | 69 GIT_HOST) |
92 | 70 |
93 if svn_url in ('http://selenium.googlecode.com/svn/trunk/py/test', | 71 if svn_url in ('http://selenium.googlecode.com/svn/trunk/py/test', |
94 'https://selenium.googlecode.com/svn/trunk/py/test', | 72 'https://selenium.googlecode.com/svn/trunk/py/test', |
95 '/trunk/deps/reference_builds/chrome'): | 73 '/trunk/deps/reference_builds/chrome'): |
96 # Those can't be git svn cloned. Skipping for now. | 74 # Those can't be git svn cloned. Skipping for now. |
97 return | 75 return |
98 | 76 |
99 # Projects on sourceforge using trunk | 77 # Projects on sourceforge using trunk |
100 match = re.match('^https?://svn.code.sf.net/p/(.*)/code/trunk(.*)', | 78 match = re.match('^https?://svn.code.sf.net/p/(.*)/code/trunk(.*)', |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 return (path, GIT_HOST + 'chromium/deps/%s' % repo, GIT_HOST) | 176 return (path, GIT_HOST + 'chromium/deps/%s' % repo, GIT_HOST) |
199 | 177 |
200 # Subdirectories of the chromium deps/reference_builds directory. | 178 # Subdirectories of the chromium deps/reference_builds directory. |
201 match = re.match('/trunk/deps/reference_builds/(.*)', svn_url) | 179 match = re.match('/trunk/deps/reference_builds/(.*)', svn_url) |
202 if match: | 180 if match: |
203 repo = '%s.git' % match.group(1) | 181 repo = '%s.git' % match.group(1) |
204 return (path, GIT_HOST + 'chromium/reference_builds/%s' % repo, GIT_HOST) | 182 return (path, GIT_HOST + 'chromium/reference_builds/%s' % repo, GIT_HOST) |
205 | 183 |
206 # Nothing yet? Oops. | 184 # Nothing yet? Oops. |
207 print 'No match for %s' % svn_url | 185 print 'No match for %s' % svn_url |
OLD | NEW |