The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,096 other followers

Syncing GExperts svn to git

Posted by jpluimers on 2020/07/23

A while ago, I made a synced git repository and put it on [WayBack] GitHub – jpluimers/GExperts: Synced every now and then from git svn clone https://svn.code.sf.net/p/gexperts/code/trunk GExperts.

I forgot to save my initial notes, but they were based on what I did before with [WayBack] jeroenp / fastmm — Bitbucket**, so I resurrected my notes, after a chat with Graeme Geldenhuys on how he did a similar thing for Indy at

[WayBack] GitHub – graemeg/indy: Indy (Internet Direct) framework. This is an unofficial mirror repository which gets synced every 15 minutes. It contains the full history from the official Indy 10 SVN repository.

So here are my notes, as on GitHub they look odd:

[WayBack] GitHub – jpluimers/GExperts

Synced every now and then from git svn clone https://svn.code.sf.net/p/gexperts/code/trunk;

Syncing steps:

first time

git svn clone https://svn.code.sf.net/p/gexperts/code/trunk GExperts.git-svn
git remote add origin https://github.com/jpluimers/GExperts.git
git push origin master

each additional time from inside the GExperts.git-svn directory:

git svn fetch
git svn rebase
git push origin

It is very similar to what Graeme does for Indy in a cron job for each subsequent sync from https://svn.atozed.com:444/!/#Indy10/view/head/trunk/Lib to https://github.com/graemeg/indy:

#!/bin/sh
# Fetches latest revisions for Indy SubVersion repository
# and then pushes changes to GitHub.
# Created by Graeme Geldenhuys 

GIT="/usr/bin/git"

cd /data/git/indy.git/
$GIT checkout master
$GIT svn rebase
$GIT gc --auto
$GIT push github

And to my FastMM notes:

Getting the latest SVN changes:

git svn rebase

Initial repository creation and add to bitbucket (or github)

git svn clone http://svn.code.sf.net/p/fastmm/code/ FastMM.git

Notes (see [WayBack] Effectively Using Git With Subversion | Viget and [WayBack] Practical tips for using Git with large Subversion repositories for explanation):

  1. Do not include the -s option after git svn clone, as this SVN repository does not have the default trunk/branches/tags structure.
  2. There are no [WayBackSVN ignore entries in this repository, so this is not needed for git svn show-ignore > .gitignore

Add the repository to Bitbucket or GitHub:

Add either of these URLs to  [WayBack] Feedly for monitoring:

Some additional tidbits:

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: