Repository management

From translatewiki.net
Revision as of 12:29, 24 March 2012 by Nike (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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 currently directory)

Each of the commands will crawl up the directory tree until it finds 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 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 new checkout or clone of any of the support projects (pending migration) by creating 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 latest changes with repoexport, and commit them with repocommit (if you have permissions!).

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


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