Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7068 closed Bug/Something is broken (fixed)

move the ir codebase from SVN to git

Reported by: Owned by:
Priority: Medium Component: Tech
Keywords: svn-to-git ir Cc:
Sensitive: no

Description (last modified by

the ir codebase should be moved from svn to git. I suspect this means that we also need to update, since it is a public deployment of the code. this is related to #7046

Change History (9)

comment:1 Changed 6 years ago by

  • Owner set to
  • Status changed from new to assigned

comment:2 Changed 6 years ago by

I created an empty ir repository on moses, with a user account to manage it:

0 moses:~# adduser --disabled-password --gecos 'MF/PL ir webapp git synchronization,,,' git-ir
Adding user `git-ir' ...
Adding new group `git-ir' (1005) ...
Adding new user `git-ir' (1005) with group `git-ir' ...
Creating home directory `/home/git-ir' ...
Copying files from `/etc/skel' ...
0 moses:~# git init --bare /srv/git/ir
Initialized empty Git repository in /srv/git/ir/
0 moses:~# chown -R git-ir /srv/git/ir
0 moses:~# cat > ~git-ir/.monkeysphere/authorized_user_ids
0 moses:~# monkeysphere-authentication u git-ir
0 moses:~# 

Then i converted the svn project to git locally, using the workflow and scripts outlined on #7046:

git init ir
cd ir
git svn init --trunk trunk/ir --tags tags/ir --branches branches/ir
git svn fetch --authors-file=../svn-authors-for-git

I created an ir repository on (referenced by, and pushed to it from alice. Then i updated that repository to update the one on SMO:

cygnus:/srv/gitosis/repositories/mfpl/ir.git# cat > hooks/post-receive
SSH_AUTH_SOCK=/var/run/gitosis-ssh-agent/socket2 git push smo
cygnus:/srv/gitosis/repositories/mfpl/ir.git# chmod a+x hooks/post-receive
cygnus:/srv/gitosis/repositories/mfpl/ir.git# su - gitosis -s /bin/bash
gitosis@cygnus:~$ cd /srv/gitosis/repositories/mfpl/ir.git/
gitosis@cygnus:~/repositories/mfpl/ir.git$ git remote add --push smo
gitosis@cygnus:~/repositories/mfpl/ir.git$ SSH_AUTH_SOCK=/var/run/gitosis-ssh-agent/socket2 git push smo master
Counting objects: 2093, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (619/619), done.
Writing objects: 100% (2093/2093), 4.59 MiB, done.
Total 2093 (delta 1265), reused 2093 (delta 1265)
 * [new branch]      master -> master
 * [new branch]      multilang -> multilang
gitosis@cygnus:~/repositories/mfpl/ir.git$ ./hooks/post-receive
Everything up-to-date
gitosis@cygnus:~/repositories/mfpl/ir.git$ logout
Last edited 6 years ago by (previous) (diff)

comment:3 Changed 6 years ago by

and i updated SMO's configuration to be able to see it here:

diff --git a/conf/trac.ini b/conf/trac.ini
index 16e638b..3c3d9a2 100644
--- a/conf/trac.ini
+++ b/conf/trac.ini
@@ -105,6 +105,10 @@ puppet.dir = /srv/git/puppet
 puppet.description = MF/PL puppet configuration
 puppet.type = git

+ir.dir = /srv/git/ir
+ir.description = Collaborative Democracy Software
+ir.type = git
 .alias = mfplsvn


And now the git repo can be seen with links like source:/ir.

what remains to be done is to convert, and then to remove source:mfplsvn/trunk/ir

comment:4 Changed 6 years ago by

Ah: i also did (as root@cygnus):

ln -s /srv/gitosis/repositories/mfpl/ir.git /var/cache/git/mfpl/

So the repo is now readable via:

git clone git://

looking into

this is hosted on peltier, so i'm looking at that now.

comment:5 Changed 6 years ago by

testing the current (svn-based) installation on peltier, i'm seeing some existing php bugs, (e.g. #7071) even with the current setup.

/var/www/ appears to be an svn checkout; and /var/www/ is a subtree svn checkout, i think.

also, these checkouts have diverged from upstream svn, and their changes haven't been merged back in. and there are non-tracked files as well. :/

comment:6 Changed 6 years ago by

I made a signed tag ir/ir-0.1 so that we could cryptographically verify the pull.

As, i cloned the git repo and verified the tag.

I saved the divergences in our svn working copy into /home/ir/tickets/7068/ir-changes.diff.

I moved /var/www/ out of the way (to /home/ir/tickets/7068) and placed the git clone in its place.

I moved /var/www/ out of the way as well, and replaced it with a symlink into the git clone.

I reapplied the local divergences to the git checkout (though we left out the changes to web/index.php, which didn't seem to be needed). seems to be working now.

Joseph and i are working on maintaining the drupal install at now...

comment:7 Changed 6 years ago by

Modified peltier's puppet config to add squeeze backports and to set the preferences to use drush from squeeze backports. Upgrade drush from version 3.3 to 4.5. Moved the webroot backup directory to ~/drush-backups. Updated ctools.

Then dkg and I created a meeting to test. Everything tested fine.

comment:8 Changed 6 years ago by

  • Resolution set to fixed
  • Status changed from assigned to closed

and with [2558/mfplsvn] i removed ir from the svn repository.

comment:9 Changed 6 years ago by

  • Description modified (diff)

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.