Fix path's current and new url comparison.

Steps to reproduce:
https://bugs.chromium.org/p/chromium/issues/detail?id=1484613#c2

Bug: 1484613
Change-Id: Id42e8e8019334444d6b2423550f04f3869e43bbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4875677
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
changes/77/4875677/10
Joanna Wang 2 years ago committed by LUCI CQ
parent 94559afc18
commit 4af2818c5b

@ -759,8 +759,11 @@ class GitWrapper(SCMWrapper):
# Skip url auto-correction if remote.origin.gclient-auto-fix-url is set.
# This allows devs to use experimental repos which have a different url
# but whose branch(s) are the same as official repos.
if (current_url.rstrip('/') != url.rstrip('/') and url != 'git://foo'
and
strp_url = url[:-4] if url.endswith('.git') else url
strp_current_url = current_url[:-4] if current_url.endswith(
'.git') else current_url
if (strp_current_url.rstrip('/') != strp_url.rstrip('/')
and url != 'git://foo' and
subprocess2.capture([
'git', 'config',
'remote.%s.gclient-auto-fix-url' % self.remote

Loading…
Cancel
Save