Bug 1380118 - aom: Record the upstream repo we vendored from. r?froydnj draft
authorRalph Giles <giles@mozilla.com>
Mon, 14 Aug 2017 14:33:55 -0700
changeset 646681 cba7a04afc91f4037248704994877b90e670f8eb
parent 646680 cfb7391a33561d5f96d9d09908a8a0ad90843f91
child 646682 29af97bf624011e127bfa2f1e39e73838ff6439f
child 648524 3d11fa2d0a27e14923d8c5df3601934d109c914c
push id74210
push userbmo:tom@mozilla.com
push dateTue, 15 Aug 2017 17:45:25 +0000
Bug 1380118 - aom: Record the upstream repo we vendored from. r?froydnj We've been recording the commit id from the last vendor in README_MOZILLA inside the various media directories. Since we now support a --repo switch to pull from forks, record this info as well, to make it easier to find contiguous upstream source. MozReview-Commit-ID: 1RanpkWfAeC
--- a/media/libaom/README_MOZILLA
+++ b/media/libaom/README_MOZILLA
@@ -9,13 +9,17 @@ directory.
 To update the library source and build config files, execute
   ./mach vendor aom
 To update to a specific upstream git tag or commit, use
   ./mach vendor aom -r <commit>
-The upstream aom git repository is:
+The upstream git repository is https://aomedia.googlesource.com/aom
+To update to a fork, use
-    https://aomedia.googlesource.com/aom
+  ./mach vendor aom --repo <repository url> [-r <commit>]
+The last update was pulled from https://aomedia.googlesource.com/aom
 The git commit ID used was f5bdeac22930ff4c6b219be49c843db35970b918 (Thu Jul 27 18:23:37 2017 +0000).
--- a/python/mozbuild/mozbuild/vendor_aom.py
+++ b/python/mozbuild/mozbuild/vendor_aom.py
@@ -121,16 +121,21 @@ Please set a repository url with --repo 
         prefix = 'The git commit ID used was'
         if prefix in readme:
             new_readme = re.sub(prefix + ' [v\.a-f0-9]+.*$',
                                 prefix + ' %s (%s).' % (revision, timestamp),
             new_readme = '%s\n\n%s %s.' % (readme, prefix, revision)
+        prefix = 'The last update was pulled from'
+        new_readme = re.sub(prefix + ' https*://.*',
+                            prefix + ' %s' % self.repo_url,
+                            new_readme)
         if readme != new_readme:
             with open(filename, 'w') as f:
     def update_mimetype(self, revision):
         '''Update source tree references to the aom revision.
         While the av1 bitstream is unstable, we track the git revision