Back to the main page.

Bug 2214 - link github and svn, i.e. have them synchronize automatically

Status CLOSED FIXED
Reported 2013-07-01 10:23:00 +0200
Modified 2013-09-18 13:19:14 +0200
Product: FieldTrip
Component: release
Version: unspecified
Hardware: All
Operating System: Mac OS
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also: http://bugzilla.fcdonders.nl/show_bug.cgi?id=1841

Robert Oostenveld - 2013-07-01 10:23:40 +0200

We have a number of svn hooks that run after every commit. These include "svncync", i.e. a script that updates the in-house version with the one on google code and on sourceforge. We should also have an automatically updated version on github.


Robert Oostenveld - 2013-07-01 10:28:34 +0200

Note to self: most git related issues have so far been discussed in relation to bug 1841.


Robert Oostenveld - 2013-07-01 10:31:07 +0200

I implemented the first post-commit-gitsync script last week. It worked for me, but today I see that there is a commit from Jan-Mathijs on svn which is not synched to github. I suspect there to be a permission problem. http://code.google.com/p/fieldtrip/source/detail?r=8289


Robert Oostenveld - 2013-07-01 10:48:33 +0200

I sudo'ed to jansch on the svn server and tried it: jansch@dccn-l017:/home/svnroot/fieldtrip/hooks 420 $ ./post-commit-gitsync /home/svnroot/fieldtrip 8289 REPOS=/home/svnroot/fieldtrip REV=8289 fatal: Unable to create '/home/svnroot/fieldtrip/hooks/gitsync/fieldtrip-github-svn/.git/index.lock': Permission denied I fixed the permission on the .git directory and tried again. 421 $ ./post-commit-gitsync /home/svnroot/fieldtrip 8289 REPOS=/home/svnroot/fieldtrip REV=8289 Switched to branch 'svn' M fileio/ft_write_mri.m r8289 = dad84fa62760b6943278a8b5bd63e8b6bfbd3429 (refs/remotes/trunk) First, rewinding head to replay your work on top of it... Fast-forwarded svn to refs/remotes/trunk. Switched to branch 'master' First, rewinding head to replay your work on top of it... Fast-forwarded master to svn. --- here it takes ~2 minutes --- Connection closed by 204.232.175.90 fatal: The remote end hung up unexpectedly It seems to run fine on the svn server, but there appears to be a connection error. I simply ran it once more 421 $ ./post-commit-gitsync /home/svnroot/fieldtrip 8289 REPOS=/home/svnroot/fieldtrip REV=8289 Switched to branch 'svn' Current branch svn is up to date. Switched to branch 'master' Current branch master is up to date. The authenticity of host 'github.com (204.232.175.90)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes --- here I have to give an answer, yuk --- Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts. Counting objects: 7, done. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 709 bytes, done. Total 4 (delta 3), reused 0 (delta 0) To git@github.com:fieldtrip/fieldtrip.git cd25f03..dad84fa master -> master and the latest commit by Jan-Mathijs appears on https://github.com/fieldtrip/fieldtrip/commits/master


Robert Oostenveld - 2013-07-01 10:50:45 +0200

the interactive question for "are you sure to connect" needs to be avoided, see http://superuser.com/questions/125324/how-can-i-avoid-sshs-host-verification-for-known-hosts I have added -o "StrictHostKeyChecking no" to the gitssh2 script.


Robert Oostenveld - 2013-08-12 15:56:57 +0200

after setting sharedRepository in the git config file, it now is working robustly.


Robert Oostenveld - 2013-09-18 13:19:14 +0200

closed multiple bugs that have been resolved