commit | 0d14d0d85b8f4899b19dfe499c3af68b96a1ee08 | [log] [tgz] |
---|---|---|
author | erikchen <erikchen@chromium.org> | Tue Aug 28 18:57:09 2018 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Aug 28 18:57:09 2018 +0000 |
tree | 4f8fde66ebe753887d275ba4224bcd02fa0302f2 | |
parent | bc56d8cfab501c5fc908c995bbd6c1883d334c33 [diff] [blame] |
"git cl patch" should ignore trailing "/" from remote url. This causes git cl patch to unnecessarily fail for the build repo. e.g. """ Trying to patch a change from https://chromium.googlesource.com/chromium/tools/build but this repo appears to be https://chromium.googlesource.com/chromium/tools/build/. """ Change-Id: I91d6ab1325bb88c001c20c20007c30e111ab8f64 Reviewed-on: https://chromium-review.googlesource.com/1194485 Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org>
diff --git a/git_cl.py b/git_cl.py index 3eebd26..b92cae1 100755 --- a/git_cl.py +++ b/git_cl.py
@@ -2832,7 +2832,10 @@ remote_url = self._changelist.GetRemoteUrl() if remote_url.endswith('.git'): remote_url = remote_url[:-len('.git')] + remote_url = remote_url.rstrip('/') + fetch_info = revision_info['fetch']['http'] + fetch_info['url'] = fetch_info['url'].rstrip('/') if remote_url != fetch_info['url']: DieWithError('Trying to patch a change from %s but this repo appears '