How to migrate a Mediawiki installation from Subversion (SVN) to Git

I had Mediawiki installed from Subversion, keeping it up to date with a simple command svn update

in the installation directory. Mediawiki has now been ported to Git and the latest security updates are only available from there. How do I switch from my Subversion installation to Git? Couldn't find any documentation or approach.

+3


source to share


2 answers


You can have svn export

local changes erase directories .svn

and then initialize the exported working copy as a new git project.

svn export myproject newproject
cd newproject
git init
git add *
git commit -m "Initializing git repository"

      

Add the Mediawiki git repository to your remote repositories for convenience.



git remote add mediawiki https://gerrit.wikimedia.org/r/p/mediawiki/core.git

      

Then when you want to make updates commit your changes and use:

git commit -m <your-commit-message-goes-here>
git pull --rebase mediawiki

      

+2


source


The following seems to work, but may not be correct or complete. The instructions are not for a production environment (although they worked for me).



  • Create a new directory httpdocs.new

  • Find the version you want to install https://gerrit.wikimedia.org/r/#admin,project,mediawiki/core,branches . At the time of writing, it REL1_18

    was stable in current
  • Clone the desired Mediawiki release to a new folder using git clone https://gerrit.wikimedia.org/mediawiki/core.git --branch REL1_18

  • Check for local changes in your previous installation httpdocs

    using for examplesvn status

  • Repeat them in the newly created files in httpdocs.new

    . Make file changes, copy files, etc.
  • Rename httpdocs

    to httpdocs.old

    . Your site will be disabled.
  • Rename httpdocs.new

    to httpdocs

    . Your new site will be online, but it may not work.
  • Run php maintenance/update.php

    to update
  • Check website and make corrections for errors 9
0


source







All Articles