Page MenuHomePhabricator

random occurences of svn and phase3 in code
Closed, ResolvedPublic

Description

as svn is not used any more, and "phase3" isn't a usable designation anymore, all the occurences should be transformed to usable values/names or removed.

----------------------8<--------------------
azatoth@azaboxen:~/build/mw/core «master u=»$ git grep -nE svn.wikimedia.org\|subversion\|phase3 | cat
HISTORY:175:* The spyc library is now no longer included in phase3.
HISTORY:1616: a smaller subversion checkout.
HISTORY:2855:* Show subversion too even if a "normal" version number is available
HISTORY:6439:* Include subversion revision number in Special:Version if available
docs/README:8: http://svn.wikimedia.org/doc/
docs/maintenance.txt:57:http://svn.wikimedia.org/doc/classMaintenance.html
extensions/README:14: https://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/
includes/DefaultSettings.php:4435: * Subversion at: http://svn.wikimedia.org/svnroot/mediawiki/trunk/udpprofile
includes/DefaultSettings.php:4503: * 'path' => '/trunk/phase3', not used client-side; for reference
includes/DefaultSettings.php:6034: * "$IP/..", i.e. starting with "phase3" for core files, and "extensions" for
includes/Init.php:84: return "phase3/$file";
includes/api/ApiBase.php:503: $path = 'phase3/' . $path;
includes/api/ApiBase.php:512: return "{$matches[0]}\n https://svn.wikimedia.org/" .
includes/api/ApiMain.php:1104: $vers[] = 'MediaWiki: ' . SpecialVersion::getVersion() . "\n https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/";
includes/logging/LogFormatter.php:227:
see https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/LogPage.php?&pathrev=97044&r1=97043&r2=97044
includes/logging/LogFormatter.php:233: https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/PatrolLog.php?&pathrev=97495&r1=97494&r2=97495
includes/specials/SpecialVersion.php:38: 'svn+ssh://svn.wikimedia.org/svnroot/mediawiki' => 'http://svn.wikimedia.org/viewvc/mediawiki',
includes/specials/SpecialVersion.php:39: 'http://svn.wikimedia.org/svnroot/mediawiki' => 'http://svn.wikimedia.org/viewvc/mediawiki',
includes/specials/SpecialVersion.php:40: 'https://svn.wikimedia.org/svnroot/mediawiki' => 'https://svn.wikimedia.org/viewvc/mediawiki',
includes/specials/SpecialVersion.php:220: * @return string wgVersion + a link to subversion revision of svn BASE
includes/specials/SpecialVersion.php:448: # Make subversion text/link.
includes/specials/SpecialVersion.php:640: * checked out with subversion.
includes/specials/SpecialVersion.php:647: * url The subversion URL of the directory
includes/specials/SpecialVersion.php:666:
check if file is xml (subversion release <= 1.3) or not (subversion release = 1.4)
includes/specials/SpecialVersion.php:668: // subversion is release <= 1.3
index.php:52: require ( 'phase3/includes/WebStart.php' );
languages/messages/MessagesQqq.php:1961:'upload-file-error' => 'Unused on core [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/specials/SpecialUpload.php?r1=53161&r2=53282].
languages/messages/MessagesQqq.php:4497:This is being used in [[Special:Version]], preceeding the subversion revision numbers of the extensions loaded inside brackets, like this: "({{int:version-revision}} r012345")
languages/messages/MessagesRo.php:2000:Lista tipurilor MIME recunoscute de MediaWiki poate fi găsită la [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/mime.types?view=markup fișiere mime.types].',
load.php:32: require ( 'phase3/includes/WebStart.php' );
maintenance/hiphop/make:33: if ( realpath( "$IP/../phase3" ) !== $IP
maintenance/hiphop/make:244: function setupFakeSourceBase( $phase3, $extensions, $dest ) {
maintenance/hiphop/make:249: $this->forceCreateLink( "$dest/phase3", $phase3 );
maintenance/hiphop/make:277: $processedFiles[] = "phase3/$file";
maintenance/hiphop/make:286: $processedFiles[] = "phase3/$file";
maintenance/hiphop/make:301: return 'phase3/' . substr( $file, strlen( $coreBase ) );
maintenance/hiphop/server.conf:25: to = /phase3/index.php?title=$1
maintenance/mwdocgen.php:258:if ( $versionNumber === false ) { # Not using subversion ?
maintenance/mwdocgen.php:259: $svnstat = ''; # Not really useful if subversion not available
maintenance/postgres/mediawiki_mysql2postgres.pl:184:-- Version: $VERSION (subversion }.q{$LastChangedRevision$}.qq{)
redirect.php:25: require ( 'phase3/includes/WebStart.php' );
Binary file tests/phpunit/data/media/test.tiff matches
----------------------8<-------------------------


Version: 1.20.x
Severity: minor

Details

Reference
bz38714

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:03 AM
bzimport set Reference to bz38714.
bzimport added a subscriber: Unknown Object (MLST).

sumanah wrote:

*** Bug 40177 has been marked as a duplicate of this bug. ***

sumanah wrote:

*** Bug 41639 has been marked as a duplicate of this bug. ***

sumanah wrote:

Things to be careful of:

https://gerrit.wikimedia.org/r/#/c/35582/ I tried to change includes/Init.php and Tim reminded me "It would need to also be changed in maintenance/hiphop/make to match."

Regarding HISTORY: in the MediaWiki core, in the git repository, there are a few English-language texts in the main directory (see https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=tree;h=refs/heads/master;hb=refs/heads/master ). They include README, UPGRADE, CREDITS, HISTORY, and a few others. The HISTORY file details important changes that have taken place over the history of MediaWiki development. I do not think it would be a good idea to change those old historical log entries to retroactively erase the references to SVN or phase3.

If you're going to try working on this, I suggest you start with docs/README , redirect.php , and includes/specials/SpecialVersion.php .

dheerajjoshi1991 wrote:

The following files with the line number contains the 'svn'

\includes\api\ApiBase.php:

110  	/**
111  	 * Returns a string that identifies the version of the extending class.
112: 	 * Typically includes the class name, the svn revision, timestamp, and
113: 	 * last author. Usually done with SVN's Id keyword
114  	 * @return string
115  	 */
...
518  		// returning the version string for ApiBase work
519  		if ( $path ) {
520: 			return "{$matches[0]}\n   https://svn.wikimedia.org/" .
521  					"viewvc/mediawiki/trunk/" . dirname( $path ) .
522  					"/{$matches[2]}";

\includes\api\ApiMain.php:
1119 public function getVersion() {
1120 $vers = array();
1121: $vers[] = 'MediaWiki: ' . SpecialVersion::getVersion() . "\n https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/";
1122 $vers[] = CLASS . ': $Id$';
1123 $vers[] = ApiBase::getBaseVersion();

\includes\api\ApiQuerySiteinfo.php:

129  			$data['git-hash'] = $git;
130  		} else {
131: 			$svn = SpecialVersion::getSvnRevision( $GLOBALS['IP'] );
132: 			if ( $svn ) {
133: 				$data['rev'] = $svn;
134  			}
135  		}
...
465  				if ( isset( $ext['version'] ) ) {
466  						$ret['version'] = $ext['version'];
467: 				} elseif ( isset( $ext['svn-revision'] ) &&
468  					preg_match( '/\$(?:Rev|LastChangedRevision|Revision): *(\d+)/',
469: 						$ext['svn-revision'], $m ) )
470  				{
471  						$ret['version'] = 'r' . $m[1];

\includes\logging\LogFormatter.php:

227  					//case 'revision': // Revision deletion
228  					//case 'event': // Log deletion
229: 						// see https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/LogPage.php?&pathrev=97044&r1=97043&r2=97044
230  					//default:
231  				}
...
233  
234  			case 'patrol':
235: 				// https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/PatrolLog.php?&pathrev=97495&r1=97494&r2=97495
236  				// Create a diff link to the patrolled revision
237  				if ( $entry->getSubtype() === 'patrol' ) {

\includes\media\XCF.php:

 6   *   http://en.wikipedia.org/wiki/XCF_(file_format)
 7   * Specification in Gnome repository:
 8:  *   http://svn.gnome.org/viewvc/gimp/trunk/devel-docs/xcf.txt?view=markup
 9   *
10   * This program is free software; you can redistribute it and/or modify

\includes\profiler\ProfilerSimpleUDP.php:

24  /**
25   * ProfilerSimpleUDP class, that sends out messages for 'udpprofile' daemon
26:  * (the one from mediawiki/trunk/udpprofile SVN )
27   * @ingroup Profiler
28   */

https://gerrit.wikimedia.org/r/51169 (Gerrit Change Ic6281dda635c67eadce55226837b2d3a575698af) | change ABANDONED [by Siebrand]

Change 94490 had a related patch set uploaded by TTO:
Clean up some old readme files and remove references to SVN

https://gerrit.wikimedia.org/r/94490

That takes care of most of it. The only real SVN-related stuff remaining is:

  • a couple of links to SVN diffs from code comments in includes/Logging/LogFormatter.php, with no explanation of how they are actually relevant,
  • and all the SVN-related stuff in SpecialVersion.php, which I don't understand. This probably needs its own bug for separate work.

Change 94490 merged by jenkins-bot:
Clean up some old readme files and remove references to SVN

https://gerrit.wikimedia.org/r/94490

I guess this is fixed now: all the "random" occurrences have been expunged. There are some "less random" ones still needing to be checked (see comment 8).