CINXE.COM
597be504cf5f03838e7ee6000052d12f8f4a4961 - labs/tools/guc - Gitiles
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>597be504cf5f03838e7ee6000052d12f8f4a4961 - labs/tools/guc - Gitiles</title><link rel="stylesheet" type="text/css" href="/r/plugins/gitiles/+static/base.css"><link rel="stylesheet" type="text/css" href="/r/plugins/gitiles/+static/doc.css"><link rel="stylesheet" type="text/css" href="/r/plugins/gitiles/+static/prettify/prettify.css"><!-- default customHeadTagPart --></head><body class="Site"><header class="Site-header"><div class="Header"><!-- default customHeader --><div class="Header-title">Gitiles</div><div class="Header-menu"> <a class="Header-menuItem" href="https://gerrit.wikimedia.org/r/">Code Review</a> <a class="Header-menuItem" href="https://gerrit.wikimedia.org/r/login/plugins%2Fgitiles%2Flabs%2Ftools%2Fguc%2F%2B%2F597be504cf5f03838e7ee6000052d12f8f4a4961">Sign In</a> </div></div></header><div class="Site-content"><div class="Container "><div class="Breadcrumbs"><a class="Breadcrumbs-crumb" href="/r/plugins/gitiles/?format=HTML">gerrit.wikimedia.org</a> / <a class="Breadcrumbs-crumb" href="/r/plugins/gitiles/labs/">labs</a> / <a class="Breadcrumbs-crumb" href="/r/plugins/gitiles/labs/tools/">tools</a> / <a class="Breadcrumbs-crumb" href="/r/plugins/gitiles/labs/tools/guc/">guc</a> / <span class="Breadcrumbs-crumb">597be504cf5f03838e7ee6000052d12f8f4a4961</span></div><div class="u-monospace Metadata"><table><tr><th class="Metadata-title">commit</th><td>597be504cf5f03838e7ee6000052d12f8f4a4961</td><td><span>[<a href="/r/plugins/gitiles/labs/tools/guc/+log/597be504cf5f03838e7ee6000052d12f8f4a4961">log</a>]</span> <span>[<a href="/r/plugins/gitiles/labs/tools/guc/+archive/597be504cf5f03838e7ee6000052d12f8f4a4961.tar.gz">tgz</a>]</span></td></tr><tr><th class="Metadata-title">author</th><td>Translation updater bot <l10n-bot@translatewiki.net></td><td>Thu Nov 07 13:20:10 2024 +0100</td></tr><tr><th class="Metadata-title">committer</th><td>Translation updater bot <l10n-bot@translatewiki.net></td><td>Thu Nov 07 13:20:10 2024 +0100</td></tr><tr><th class="Metadata-title">tree</th><td><a href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/">a645eaa80f7c97475deb4d393c5e13f04a123c5c</a></td></tr><tr><th class="Metadata-title">parent</th><td><a href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961%5E">25303349e75a250bd47502d2b11f371080e59b75</a> <span>[<a href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961%5E%21/">diff</a>]</span></td></tr></table></div><pre class="u-pre u-monospace MetadataMessage">Localisation updates from <a href="https://translatewiki.net.">https://translatewiki.net.</a> Change-Id: <a href="https://gerrit.wikimedia.org/r/#/q/I6df848439c5d4fedfac56fd30ce72f584a542a55">I6df848439c5d4fedfac56fd30ce72f584a542a55</a> </pre><ul class="DiffTree"><li><a href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/i18n/scn.json">i18n/scn.json</a><span class="DiffTree-action DiffTree-action--modify">[<a href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961%5E%21/#F0">diff</a>]</span></li></ul><div class="DiffSummary">1 file changed</div><div class="TreeDetail"><div class="u-sha1 u-monospace TreeDetail-sha1">tree: a645eaa80f7c97475deb4d393c5e13f04a123c5c</div><ol class="FileList"><li class="FileList-item FileList-item--gitTree" title="Tree - .phan/"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/.phan/">.phan/</a></li><li class="FileList-item FileList-item--gitTree" title="Tree - cache/"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/cache/">cache/</a></li><li class="FileList-item FileList-item--gitTree" title="Tree - i18n/"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/i18n/">i18n/</a></li><li class="FileList-item FileList-item--gitTree" title="Tree - resources/"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/resources/">resources/</a></li><li class="FileList-item FileList-item--gitTree" title="Tree - src/"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/src/">src/</a></li><li class="FileList-item FileList-item--gitTree" title="Tree - tests/"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/tests/">tests/</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - .gitignore"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/.gitignore">.gitignore</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - .gitreview"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/.gitreview">.gitreview</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - api.php"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/api.php">api.php</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - composer.json"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/composer.json">composer.json</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - index.php"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/index.php">index.php</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - LICENSE"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/LICENSE">LICENSE</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - phpcs.xml"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/phpcs.xml">phpcs.xml</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - phpunit.xml.dist"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/phpunit.xml.dist">phpunit.xml.dist</a></li><li class="FileList-item FileList-item--regularFile" title="Regular file - README.md"><a class="FileList-itemLink" href="/r/plugins/gitiles/labs/tools/guc/+/597be504cf5f03838e7ee6000052d12f8f4a4961/README.md">README.md</a></li></ol><div class="InlineReadme"><div class="InlineReadme-path">README.md</div><div class="doc"><h1><a class="h" name="Global-user-contributions" href="#Global-user-contributions"><span></span></a><a class="h" name="global-user-contributions" href="#global-user-contributions"><span></span></a>Global user contributions</h1><h2><a class="h" name="Getting-started" href="#Getting-started"><span></span></a><a class="h" name="getting-started" href="#getting-started"><span></span></a>Getting started</h2><p>Requires <a href="https://getcomposer.org/">Composer</a> and PHP 7.4 or later.</p><pre class="code">composer install composer serve </pre><p>Then open <a href="http://localhost:4000">http://localhost:4000</a>.</p><h3><a class="h" name="Local-development" href="#Local-development"><span></span></a><a class="h" name="local-development" href="#local-development"><span></span></a>Local development</h3><p>You can use the following patch to stub the database and render some of the response UI locally.</p><pre class="code"># src/App.php protected function openDB($host, $dbname = null) { return new class() { public function prepare(string $query) { return new class() { public function bindParam() { } public function execute() { } public function fetchAll() { return []; } }; } }; } </pre><h2><a class="h" name="Toolforge-management" href="#Toolforge-management"><span></span></a><a class="h" name="toolforge-management" href="#toolforge-management"><span></span></a>Toolforge management</h2><p>See also:</p><ul><li><a href="https://wikitech.wikimedia.org/wiki/Help:Toolforge/Kubernetes#PHP">Help:Toolforge/Kubernetes#PHP</a>, Wikitech.</li></ul><h3><a class="h" name="Installation" href="#Installation"><span></span></a><a class="h" name="installation" href="#installation"><span></span></a>Installation</h3><pre class="code">$ ssh tools-login.wmflabs.org you@tools-bastion$ become my-tool-here mytool@tools-bastion:~$ git clone … git-guc mytool@tools-bastion:~$ ln -s git-guc public_html mytool@tools-bastion:~$ webservice --backend=kubernetes php8.2 restart mytool@tools-bastion:~$ webservice shell tools.guc@interactive:~$ cd git-guc tools.guc@interactive:git-guc$ chmod 775 cache/ tools.guc@interactive:git-guc$ composer install --no-dev </pre><h3><a class="h" name="Deploy-changes" href="#Deploy-changes"><span></span></a><a class="h" name="deploy-changes" href="#deploy-changes"><span></span></a>Deploy changes</h3><pre class="code">$ ssh tools-login.wmflabs.org you@tools-bastion$ become guc guc@tools-bastion:~$ webservice shell tools.guc@interactive:~$ cd git-guc tools.guc@interactive:git-guc$ git pull tools.guc@interactive:git-guc$ composer update --no-dev </pre><h2><a class="h" name="History" href="#History"><span></span></a><a class="h" name="history" href="#history"><span></span></a>History</h2><ul><li>2008: Luxo published GUC tool on Toolserver at <a href="http://toolserver.org/~luxo/contributions/contributions.php">toolserver.org/~luxo/contributions/contributions.php</a> (<a href="https://web.archive.org/web/20080601140738/http://toolserver.org/~luxo/contributions/contributions.php">Internet Archive</a>)</li><li>2010: Krinkle published MoreContributions tool on Toolserver at <a href="https://toolserver.org/~krinkle/MoreContributions/">toolserver.org/~krinkle/MoreContributions/</a> (<a href="https://github.com/Krinkle/toolserver-misc#morecontributions">Screenshot</a>, <a href="https://github.com/Krinkle/toolserver-misc#morecontributions">Source code</a>, <a href="https://web.archive.org/web/20110225023253/https://toolserver.org/~krinkle/MoreContributions/input.php">Internet Archive</a>).</li><li>2014: GUC rewritten by Luxo for Toolforge, and migrated from SVN (Toolserver Fisheye) to Git (Wikimedia Gerrit) at <a href="https://gerrit.wikimedia.org/g/labs/tools/guc/">https://gerrit.wikimedia.org/g/labs/tools/guc/</a>.</li><li>2014: Krinkle added as maintainer.</li><li>2014: Add "Chronological" and "Wildcard" features from MoreContributions to GUC. <a href="https://phabricator.wikimedia.org/T70358">T70358</a>, <a href="https://phabricator.wikimedia.org/T66499">T66499</a></li><li>2017: Add "Replag" API integration. <a href="https://phabricator.wikimedia.org/T170024">T170024</a></li><li>2017: Add localisation to translate the tool, powered by the <a href="https://gerrit.wikimedia.org/g/labs/tools/intuition">Intuition library</a>. <a href="https://phabricator.wikimedia.org/T151657">T151657</a></li><li>2018: Faster responses through better connection reuse. <a href="https://phabricator.wikimedia.org/T186436">T186436</a></li><li>2018: Apply <code class="code">comment</code> table migration. <a href="https://phabricator.wikimedia.org/T208461">T208461</a></li><li>2019: Apply <code class="code">actor</code> table migration. <a href="https://phabricator.wikimedia.org/T224440">T224440</a></li><li>2019: Faster responses by adopting WMCS-specific table views: <code class="code">comment_revision</code>, <code class="code">actor_recentchanges</code>, and <code class="code">actor_revision</code>.</li><li>2019: Faster responses by leveraging CentralAuth metadata. <a href="https://phabricator.wikimedia.org/T195515">T195515</a></li><li>2019: Promote chronological "By date" mode as default. <a href="https://phabricator.wikimedia.org/T193896">T193896</a></li></ul></div></div></div></div> <!-- Container --></div> <!-- Site-content --><!-- default customFooter --><footer class="Site-footer"><div class="Footer"><span class="Footer-poweredBy">Powered by <a href="https://gerrit.googlesource.com/gitiles/">Gitiles</a></span><span class="Footer-formats"><a class="u-monospace Footer-formatsItem" href="?format=TEXT">txt</a> <a class="u-monospace Footer-formatsItem" href="?format=JSON">json</a></span></div></footer></body></html>