Repository management

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, 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


# Mediawiki extensions, SVN
#REPO_MWEXTSVN= # Read-only

# Mediawiki extensions, GIT
#REPO_MWEXTGIT= # Read-only

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.