* [PATCH] Add revlinks and documentation
@ 2022-05-02 23:59 Mark Wielaard
0 siblings, 0 replies; only message in thread
From: Mark Wielaard @ 2022-05-02 23:59 UTC (permalink / raw)
To: overseers; +Cc: Mark Wielaard
From: Mark Wielaard <mark@klomp.org>
Note that only new changesets (after this commit) will get revlinks.
Old changesets are already stored in the database without a revlink.
---
README | 4 ++++
TODO | 3 ---
builder/master.cfg | 29 ++++++++++++++++++++++++++++-
3 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/README b/README
index 3afc8f2..72779d1 100644
--- a/README
+++ b/README
@@ -11,6 +11,10 @@ htdocs: document root of https://builder.sourceware.org/
- Define a repourl to be used in the GitPoller and any Build Steps
project_repourl = 'git://sourceware.org/git/project.git'
+ - If the repourl is "new" (not sourceware, gcc or wildebeest)
+ then add a revlink matches (at the end of master.cfg) so
+ changesets get an URL to the actual commit.
+
- Define a change source, e.g. a GitPoller and add it
project_gitpoller = changes.GitPoller(repourl=project_repourl,
branches=['main'],
diff --git a/TODO b/TODO
index fe82827..127edfd 100644
--- a/TODO
+++ b/TODO
@@ -27,9 +27,6 @@ https://docs.buildbot.net/current/manual/secretsmanagement.html
- Prometheus Metrics:
https://pypi.org/project/buildbot-prometheus/
-- Revlinks:
-https://docs.buildbot.net/current/manual/configuration/global.html#revision-links
-
- Codebase generator:
https://docs.buildbot.net/current/manual/configuration/global.html#codebase-generator
diff --git a/builder/master.cfg b/builder/master.cfg
index 864f4db..b0fa60a 100644
--- a/builder/master.cfg
+++ b/builder/master.cfg
@@ -202,7 +202,7 @@ debugedit_gitpoller = changes.GitPoller(repourl=debugedit_repourl,
c['change_source'].append(debugedit_gitpoller)
# Use a mirror to not hit github rate limiting
-gccrust_repourl='https://code.wildebeest.org/git/mirror/gccrs/'
+gccrust_repourl='https://code.wildebeest.org/git/mirror/gccrs'
gccrust_gitpoller = changes.GitPoller(repourl=gccrust_repourl,
branches=['master'],
pollInterval=223,
@@ -1787,3 +1787,30 @@ c['caches'] = {
'objectids' : 40, # number of object IDs
'usdicts' : 80, # number of rows from the users table
}
+
+# revlinks
+# http://docs.buildbot.net/current/manual/configuration/global.html#revision-links
+#
+sourcewareRevLink = util.RevlinkMatch(
+ repo_urls=[r'git://sourceware.org/git/(.*)',
+ r'https://sourceware.org/git/(.*)'],
+ revlink=r'https://sourceware.org/git?p=\1;a=commitdiff;h=%s')
+gccRevLink = util.RevlinkMatch(
+ repo_urls=[r'git://gcc.gnu.org/git/(.*)',
+ r'https://gcc.gnu.org/git/(.*)'],
+ revlink=r'https://gcc.gnu.org/git?p=\1;a=commitdiff;h=%s')
+wildebeestRevLink = util.RevlinkMatch(
+ repo_urls=[r'git://code.wildebeest.org/(.*).git',
+ r'https://code.wildebeest.org/git/(.*)'],
+ revlink=r'https://code.wildebeest.org/git/\1/commit/?id=%s')
+
+reflinks = [sourcewareRevLink, gccRevLink, wildebeestRevLink]
+
+def revlinkmultiplexer(rev,repo):
+ for revlink in reflinks:
+ url = revlink(rev, repo)
+ if url:
+ return url
+ return None
+
+c['revlink'] = revlinkmultiplexer
--
1.8.3.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-02 23:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 23:59 [PATCH] Add revlinks and documentation Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).