Difference between revisions of "Repository management"

From translatewiki.net
Jump to navigation Jump to search
 
m (wikify a bit)
Line 1: Line 1:
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.
+
When MediaWiki [[mw:Git conversion|switched to GIT]] in 2012-03... Finland melted. [[User:Nike|Nike]] took the opportunity to change the organic scripts for our repo management into something more standardized.
   
  +
==Commands==
Repository handling is now centralized in the following four commands:
 
  +
The repository handling is now centralized in the following four commands:
* repocreate
 
  +
* <code>repocreate</code>
* repoupdate
 
  +
* <code>repoupdate</code>
* repoexport
 
  +
* <code>repoexport</code>
* repocommit
 
  +
* <code>repocommit</code>
   
 
Each command takes two arguments:
 
Each command takes two arguments:
* project name: freecol, mediawiki-extensions, mifos, mwlib, WikipediaMobile
+
* project name: <code>freecol, mediawiki-extensions, mifos, mwlib, WikipediaMobile</code>
* optionally a directory to use as working directory (defaults to currently directory)
+
* 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 file named REPOCONF. All project directories will be placed under that 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 helper command <code>repo</code> which takes two arguments:
+
To ease up the management of the read-only repositories used by translatewiki.net, there is a helper command <code>repo</code> which takes two arguments:
* command: update, create, (export and commit can be used too, but they don't make any sense!)
+
* command: <code>update, create</code> (<code>export</code> and <code>commit</code> can be used too, but they don't make any sense!)
 
* project name as above, or <code>all</code>
 
* project name as above, or <code>all</code>
   
This command automatically works in the /resources/projects/ location and uses <code>betawiki</code> 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.
+
This command automatically works in the <code>/resources/projects/</code> location and uses <code>betawiki</code> user. So for example you can update everything with just <code>repo update all</code> or just one project with <code>repo update freecol</code>. 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!).
+
You can easily create a new checkout or clone of any of the support projects (pending migration) by creating a REPOCONF file and issuing <code>repocreate freecol</code> for example. For examples see <code>/resources/nike/REPOCONF</code> or <code>/resources/projects/REPOCONF</code>. Remember to set <code>REPO_RW</code> to <code>yes</code> in <code>REPOCONF</code>. Then you can easily export the latest changes with <code>repoexport</code>, and commit them with <code>repocommit</code> (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 repoconf:
 
  +
<source lang=bash>
 
  +
==Example files==
  +
Example <code>repoconf</code>:
  +
  +
<source lang="bash">
 
# If not set, will not setup l10n-bot commit stuff for MediaWiki git extensions
 
# If not set, will not setup l10n-bot commit stuff for MediaWiki git extensions
 
REPO_RW=yes
 
REPO_RW=yes
Line 44: Line 49:
 
</source>
 
</source>
   
  +
[[Category:{{SITENAME}}]]
 
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.
 

Revision as of 12:41, 24 March 2012

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