Repository management

From translatewiki.net
Revision as of 12:41, 24 March 2012 by Nemo bis (talk | contribs) (wikify a bit)
Jump to navigation Jump to search

When MediaWiki switched to GIT in 2012-03... Finland melted. Nike took the opportunity to change the organic scripts for our repo management into something more standardized.

Commands

The repository handling is now centralized in the following four commands:

  • repocreate
  • repoupdate
  • repoexport
  • repocommit

Each command takes two arguments:

  • project name: freecol, mediawiki-extensions, mifos, mwlib, WikipediaMobile
  • optionally a directory to use as working directory (defaults to current directory)

Each of the commands will crawl up the directory tree until it finds a file named REPOCONF. All project directories will be placed under that directory.

To ease up the management of the read-only repositories used by translatewiki.net, there is a helper command repo which takes two arguments:

  • command: update, create (export and commit can be used too, but they don't make any sense!)
  • project name as above, or all

This command automatically works in the /resources/projects/ location and uses betawiki user. So for example you can update everything with just repo update all or just one project with repo update freecol. Remember that you still need to sync the changes into the wiki one way or another.

You can easily create a new checkout or clone of any of the support projects (pending migration) by creating a REPOCONF file and issuing repocreate freecol for example. For examples see /resources/nike/REPOCONF or /resources/projects/REPOCONF. Remember to set REPO_RW to yes in REPOCONF. Then you can easily export the latest changes with repoexport, and commit them with repocommit (if you have permissions!).

To be able to commit as l10n-bot for the MediaWiki git extension updates, you need to know the pass phrase for the private key. Ask Niklas or Siebrand.

Example files

Example repoconf:

# If not set, will not setup l10n-bot commit stuff for MediaWiki git extensions
REPO_RW=yes

REPO_FREECOL=https://freecol.svn.sourceforge.net/svnroot/freecol/freecol/trunk/data/strings

REPO_MIFOS=git@github.com:mifos/head.git

# Mediawiki extensions, SVN
#REPO_MWEXTSVN=http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions # Read-only
REPO_MWEXTSVN=svn+ssh://username@svn.wikimedia.org/svnroot/mediawiki/trunk/extensions

# Mediawiki extensions, GIT
#REPO_MWEXTGIT=https://gerrit.wikimedia.org/r/p/mediawiki/extensions # Read-only
REPO_MWEXTGIT=ssh://l10n-bot@gerrit.wikimedia.org:29418/mediawiki/extensions

REPO_MWLIB=git@github.com:pediapress/mwlib.git
REPO_MWLIBRL=git@github.com:pediapress/mwlib.rl.git

REPO_WIKIPEDIAMOBILE=git@github.com:wikimedia/WikipediaMobile.git