[tor-commits] [Git][tpo/applications/tor-browser][base-browser-102.7.0esr-12.5-1] Bug 41603: Customize the creation of MOZ_SOURCE_URL

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Thu Feb 2 14:30:35 UTC 2023



Pier Angelo Vendrame pushed to branch base-browser-102.7.0esr-12.5-1 at The Tor Project / Applications / Tor Browser


Commits:
2b933eba by Pier Angelo Vendrame at 2023-02-02T15:30:24+01:00
Bug 41603: Customize the creation of MOZ_SOURCE_URL

MOZ_SOURCE_URL is created by combining MOZ_SOURCE_REPO and
MOZ_SOURCE_CHANGESET.
But the code takes for granted that it refers to a Hg instance, so it
combines them as `$MOZ_SOURCE_REPO/rev/$MOZ_SOURCE_CHANGESET`.
With this commit, we change this logic to combine them to create a URL
that is valid for GitLab.
$MOZ_SOURCE_CHANGESET needs to be a commit hash, not a branch or a tag.
If that is needed, we could use /-/tree/, instead of /-/commit/.

- - - - -


1 changed file:

- build/variables.py


Changes:

=====================================
build/variables.py
=====================================
@@ -97,7 +97,7 @@ def source_repo_header(output):
         output.write("#define MOZ_SOURCE_STAMP %s\n" % changeset)
 
     if repo and buildconfig.substs.get("MOZ_INCLUDE_SOURCE_INFO"):
-        source = "%s/rev/%s" % (repo, changeset)
+        source = "%s/-/commit/%s" % (repo, changeset)
         output.write("#define MOZ_SOURCE_REPO %s\n" % repo)
         output.write("#define MOZ_SOURCE_URL %s\n" % source)
 



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2b933eba3cd5666b9b0efa7f946b3b78192bca73

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/2b933eba3cd5666b9b0efa7f946b3b78192bca73
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20230202/71fcb300/attachment-0001.htm>


More information about the tor-commits mailing list