From 021372392977ab78a41c18e99897e64589385e7b Mon Sep 17 00:00:00 2001 From: Aaron Gable Date: Thu, 29 Jun 2017 11:47:31 -0700 Subject: [PATCH] Rietveld upload.py: send remote url instead of root hash Using the remote url is much more useful than the hash of the first commit in the repo, since we can use it to track down repos, teams, and people still using Rietveld for review. Bug: 600469 Change-Id: I067594794ba77692c11daf63b5f5844d36209a08 Reviewed-on: https://chromium-review.googlesource.com/556301 Reviewed-by: Andrew Bonventre Reviewed-by: Robbie Iannucci Commit-Queue: Aaron Gable --- third_party/upload.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/upload.py b/third_party/upload.py index d48cb5dc1d..044b6927f8 100755 --- a/third_party/upload.py +++ b/third_party/upload.py @@ -1373,6 +1373,10 @@ class GitVCS(VersionControlSystem): self.renames = {} def GetGUID(self): + remote, retcode = RunShellWithReturnCode( + "git config remote.origin.url".split()) + if not retcode: + return remote.strip() revlist = RunShell("git rev-list --parents HEAD".split()).splitlines() # M-A: Return the 1st root hash, there could be multiple when a # subtree is merged. In that case, more analysis would need to