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 651860 6cc5c87677603f8e1f3116b04d5bdb5edfed7e5a
parent 651859 fa7f4faef4ad04988f1a20934657293fcdf63fd9
child 651861 3226598378adf48cb289b915dd7e824df68d1283
child 651878 0d46b1befb5137ee0c012f2d3db958b319f96563
push id75832
push userbmo:giles@thaumas.net
push dateThu, 24 Aug 2017 03:49:46 +0000
reviewersfroydnj
bugs1380118
milestone57.0a1
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
media/libaom/README_MOZILLA
python/mozbuild/mozbuild/vendor_aom.py
--- 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),
                                 readme)
         else:
             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:
                 f.write(new_readme)
 
     def update_mimetype(self, revision):
         '''Update source tree references to the aom revision.
 
         While the av1 bitstream is unstable, we track the git revision