Convert branch revision to remote branch in status call.
We pull the revision from the DEPS url, but if the revision is a branch, the string must be converted into the local branch names we have for remote branches.
Bug: 1464985
Change-Id: I32c89c947319a04421c46d09d057e42043594e76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4699021
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
diff --git a/gclient_scm.py b/gclient_scm.py
index 8bb1a20..64db8a5 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -1044,6 +1044,8 @@
if self.url:
_, base_rev = gclient_utils.SplitUrlRevision(self.url)
if base_rev:
+ if base_rev.startswith('refs/'):
+ base_rev = ''.join(scm.GIT.RefToRemoteRef(base_rev, self.remote))
merge_base = [base_rev]
self._Run(
['-c', 'core.quotePath=false', 'diff', '--name-status'] + merge_base,