| 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 match = re.match('^https?://webrtc.googlecode.com/svn/(deps|trunk)/(.*)', | 64 # TODO(niklase) Remove after landing https://codereview.chromium.org/86563002 |
| 65 svn_url) | 65 if re.match('^https?://webrtc.googlecode.com/svn/stable/webrtc$', 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) |
| 66 if match: | 79 if match: |
| 67 repo = '%s.git' % match.group(2) | 80 return (path, GIT_HOST + 'external/webrtc/src.git', GIT_HOST) |
| 68 return (path, GIT_HOST + 'external/webrtc/%s/%s' % (match.group(1), repo), | 81 |
| 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', |
| 69 GIT_HOST) | 91 GIT_HOST) |
| 70 | 92 |
| 71 if svn_url in ('http://selenium.googlecode.com/svn/trunk/py/test', | 93 if svn_url in ('http://selenium.googlecode.com/svn/trunk/py/test', |
| 72 'https://selenium.googlecode.com/svn/trunk/py/test', | 94 'https://selenium.googlecode.com/svn/trunk/py/test', |
| 73 '/trunk/deps/reference_builds/chrome'): | 95 '/trunk/deps/reference_builds/chrome'): |
| 74 # Those can't be git svn cloned. Skipping for now. | 96 # Those can't be git svn cloned. Skipping for now. |
| 75 return | 97 return |
| 76 | 98 |
| 77 # Projects on sourceforge using trunk | 99 # Projects on sourceforge using trunk |
| 78 match = re.match('^https?://svn.code.sf.net/p/(.*)/code/trunk(.*)', | 100 match = re.match('^https?://svn.code.sf.net/p/(.*)/code/trunk(.*)', |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 return (path, GIT_HOST + 'chromium/deps/%s' % repo, GIT_HOST) | 198 return (path, GIT_HOST + 'chromium/deps/%s' % repo, GIT_HOST) |
| 177 | 199 |
| 178 # Subdirectories of the chromium deps/reference_builds directory. | 200 # Subdirectories of the chromium deps/reference_builds directory. |
| 179 match = re.match('/trunk/deps/reference_builds/(.*)', svn_url) | 201 match = re.match('/trunk/deps/reference_builds/(.*)', svn_url) |
| 180 if match: | 202 if match: |
| 181 repo = '%s.git' % match.group(1) | 203 repo = '%s.git' % match.group(1) |
| 182 return (path, GIT_HOST + 'chromium/reference_builds/%s' % repo, GIT_HOST) | 204 return (path, GIT_HOST + 'chromium/reference_builds/%s' % repo, GIT_HOST) |
| 183 | 205 |
| 184 # Nothing yet? Oops. | 206 # Nothing yet? Oops. |
| 185 print 'No match for %s' % svn_url | 207 print 'No match for %s' % svn_url |
| OLD | NEW |