Git/Conversion/Mirror

Right now our git repos for core & WMF-deployed extensions are mirroring SVN. They need manual updating daily-ish though. This page is to tell people with formey access how to do it.

Overview:

The working directory is /svnroot/git-dumps

Scripts are in software/svn2git/scripts

Dumps in mediawiki/

Do not delete the log* files!

Step 0: SSH to formey
ssh -A svn.wikimedia.org

Step 1: Dump core/extensions through HEAD
To dump wmf extensions, do the following: /svnroot/git-dumps/software/svn2git/scripts/dump-wmf-ext To dump core, do the following: /svnroot/git-dumps/software/svn2git/scripts/dump-core

Step 2: Repack the dump(s)
git-fast-import is horribly inefficient at chosing deltas, so we should repack the repos before pushing them. To repack all extensions (this can take awhile): /svnroot/git-dumps/software/svn2git/scripts/repack-wmf-ext If you're only wanting to repack like 1 or 2 extensions, you can save time by changing to the extension directory (cd /svnroot/git-dumps/mediawiki/extensions/foo) and issuing the following: git repack -a -d -f --depth=250 --window=250 To repack core: /svnroot/git-dumps/software/svn2git/scripts/repack-core

Step 3: Give yourself push access
Push access to these repos is currently disabled, so you'll need to give yourself access (also you need to be in the 'mediawiki' group). Go to and click edit. Then change Deny -> Allow for "mediawiki" for the "Push" and "Create Reference" permissions on the reference called "refs/*". Press save changes at the bottom.

Step 4: Push the repo(s)
To push all extensions: /svnroot/git-dumps/software/svn2git/scripts/push-wmf-ext To push core: /svnroot/git-dumps/software/svn2git/scripts/push-core

Step 5: Reset permissions
Change those two permissions from step 3 back to "Deny"