|
@@ -0,0 +1,30 @@
|
|
|
+# HG changeset patch
|
|
|
+# User Ian Neal <iann_cvs@blueyonder.co.uk>
|
|
|
+# Parent e8ad4683e96ad5c142ce1cc44b9cc05638baad80
|
|
|
+Bug 1605729 - Extend variables.py to understand gitlab repos. r=frg a=frg
|
|
|
+
|
|
|
+diff --git a/build/variables.py b/build/variables.py
|
|
|
+--- a/build/variables.py
|
|
|
++++ b/build/variables.py
|
|
|
+@@ -85,17 +85,20 @@ def source_repo_header(output):
|
|
|
+ if not changeset:
|
|
|
+ raise Exception('could not resolve changeset; '
|
|
|
+ 'try setting MOZ_SOURCE_CHANGESET')
|
|
|
+
|
|
|
+ if changeset:
|
|
|
+ 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)
|
|
|
++ if "gitlab" in repo:
|
|
|
++ source = '%s/tree/%s' % (repo, changeset)
|
|
|
++ else:
|
|
|
++ source = '%s/rev/%s' % (repo, changeset)
|
|
|
+ output.write('#define MOZ_SOURCE_REPO %s\n' % repo)
|
|
|
+ output.write('#define MOZ_SOURCE_URL %s\n' % source)
|
|
|
+
|
|
|
+
|
|
|
+ def main(args):
|
|
|
+ if (len(args)):
|
|
|
+ func = globals().get(args[0])
|
|
|
+ if func:
|