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 <andybons@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
changes/01/556301/2
Aaron Gable 8 years ago committed by Commit Bot
parent 665a4398b5
commit 0213723929

@ -1373,6 +1373,10 @@ class GitVCS(VersionControlSystem):
self.renames = {} self.renames = {}
def GetGUID(self): 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() revlist = RunShell("git rev-list --parents HEAD".split()).splitlines()
# M-A: Return the 1st root hash, there could be multiple when a # M-A: Return the 1st root hash, there could be multiple when a
# subtree is merged. In that case, more analysis would need to # subtree is merged. In that case, more analysis would need to

Loading…
Cancel
Save