Jump to content
dummzeuch

Contributing to projects on GitHub with Subversion

Recommended Posts

Many open source projects have moved from the former top dog Slashdot to GitHub and in the process usually converted from Subversion to git. This also includes quite a few Delphi libraries like project Jedi (JCL/JVCL), SynEdit or Indy.

I am not really comfortable with git, it just feels too complex for most projects and the GUI tools I have tried are clunky compared to TortoiseSVN. I see some advantages, but so far I’m not convinced. So, I have stayed with SVN and used that to access GitHub repositories through their git-svn bridge. This works fine, most of the time, unless you want to rename a file, which apparently is not possible for whatever reason.

Now, contributing to such projects is another challenge. You need to create something called “pull requests“, which basically is a way of creating patches that are centrally managed by GitHub together with a discussion area for them. It took me a while to get my head around the process but I think I got it now.

 

Read on in my blog post.

  • Like 2

Share this post


Link to post

The organization wants us to switch from SVN to GitHub, but most of use have very limited experience with git - so it is a learning curve that I expect will yield some hard-earned experiences.  However, I think we'd want to go all in, instead of this in-between solution?

Share this post


Link to post

If that decision has been made, you'd probably better learn to use git. For me, there is no such external decision maker involved.

 

4 minutes ago, Lars Fosdal said:

The organization wants us to switch from SVN to GitHub,

Really to GitHub or rather to a self hosted git repository? Is your current SVN repository also hosted off-site?

Edited by dummzeuch

Share this post


Link to post
17 minutes ago, dummzeuch said:

If that decision has been made, you'd probably better learn to use git. For me, there is no such external decision maker involved.

 

Really to GitHub or rather to a self hosted git repository? Is your current SVN repository also hosted off-site?

 
 

GitHub.  We are moving world+dog to the cloud.  Current SVN is on-site, and requires maintenance.

Share this post


Link to post
8 minutes ago, Lars Fosdal said:

The organization wants us to switch from SVN to GitHub, but most of use have very limited experience with git - so it is a learning curve that I expect will yield some hard-earned experiences.

Coming from SVN I struggled for a long time with Git. Primarily because the terminology is different. Once I understood the terms properly it clicked and I haven't touched SVN since. Nor do I want to.

 

38 minutes ago, dummzeuch said:

the GUI tools I have tried are clunky compared to TortoiseSVN

I think you need to try some more then. There's always TortoiseGit. I have it installed but I very seldom use it. It just feels clunky compared to *everything else*.

 

41 minutes ago, dummzeuch said:

This works fine, most of the time, unless you want to rename a file, which apparently is not possible for whatever reason. 

One thing you need to be aware of is that in Git a file rename (or move) is is just a delete followed by an add.  So there is no move/rename per se.  That these two operations (delete+add) constitutes a move/rename is detected based on the content of the file. Therefore you should never rename a file and change the content in the same commit.

  • Like 1

Share this post


Link to post
35 minutes ago, Lars Fosdal said:

GitHub.  We are moving world+dog to the cloud.  Current SVN is on-site, and requires maintenance.

Consider GitLab - while the hosting offer is probably similar their entire CI/DevOps stack is superior to what GitHub offers. Especially for using a language like Delphi where you cannot simply use some cloud service to compile stuff.

(plus you can host GitLab entirely yourself should you want to in the future)

Share this post


Link to post
9 minutes ago, Stefan Glienke said:

Consider GitLab - while the hosting offer is probably similar their entire CI/DevOps stack is superior to what GitHub offers. Especially for using a language like Delphi where you cannot simply use some cloud service to compile stuff.

Looks nice.

Do you know if they can also host the Gitlab runners or do you need to host those elsewhere? As far as I can tell, for a Delphi environment, I would need a runner running on Windows hosted on another platform (e.g. Azure) or a docker service running somewhere.

Share this post


Link to post
1 hour ago, Anders Melander said:

Do you know if they can also host the Gitlab runners or do you need to host those elsewhere?

I don't know - we are using self hosted GitLab - which only runs on Unix (see system requirements) and multiple Windows Server Virtual Machines that have Delphi, GitLab runner and much more installed.

My guess though is their hosting just contains GitLab and not anything Windows.

  • Thanks 1

Share this post


Link to post

Coming from CVS, SVN was a huge relief. I've contributed to TortoiseSVN quite a lot. At work we are using SVN or Mercurial, depending on the Team :D. For my OSS stuff im only using GitHub, even though I have accounts on SF, OSDN, GitLab and Bitbucket too.

 

The workflows are different. Some things are easier with SVN others with Git. I like pull-requests a lot. They allow you to contribute to a project without having direct commit access. The equivalent in SVN would be sending patch files.

Share this post


Link to post

The first VCS I used a long-time ago were CVS and FreeVCS (anyone remembers that?). 

In the days of Google code, I became an SVN fan using TortoiseSVN.   When Google Code shut down all projects moved to Github and converted to git.  But, I was very reluctant to move to git  and carried on using SVN to work with Git repositories.  Soon, I realize this change-resisting approach was counter-productive.  I then switched to TortoiseGit and never looked back. 

 

Having to fork a repository to submit a PR is rather cumbersome (I wish you could do that from a clone), but I do understand the reasons why this is so.

Share this post


Link to post
6 hours ago, Lars Fosdal said:

GitHub.  We are moving world+dog to the cloud.  Current SVN is on-site, and requires maintenance. 

Not much maintenance, someone else set-up SVN on my public server 12 years ago and I barely touched it until Windows 2008 support ceased and I had to move it to a new server. Took a while to find out why svn; was not responding finally discovered a service svnserver.exe had been running for 12 years which I never noticed. 

 

I tried a git pull once, put me off Git for life, so complicated. 

 

Angus

Share this post


Link to post
2 hours ago, Angus Robertson said:

I tried a git pull once, put me off Git for life, so complicated.

Reminds me of the time I tried to teach the great grandparents to use a mobile phone...

  • Haha 2

Share this post


Link to post
3 hours ago, pyscripter said:

The first VCS I used a long-time ago were CVS and FreeVCS (anyone remembers that?). 

Here's my VCS journey, as I remember it:

1994: MKS Source Integrity

1997: StarBase Versions & StarTeam, PVCS and CVS

1999: Borland TeamSource & Visual SourceSafe

2004 Borland StarTeam

2008 SVN

2018 Visual Studio Team Services

2019 Git

 

Of these VSS and VSTS were bad but PVCS was horrible. Borland TeamSource is best forgotten.

Share this post


Link to post
Guest

Visual Code + a select extension can provide a very good UI to both Git and SVN.

Share this post


Link to post
52 minutes ago, Dany Marmur said:

Visual Code + a select extension can provide a very good UI to both Git and SVN.

Honestly I'm got so used to TortoiseGit that I don't use built-in CSV facilities neither in RAD nor in VSCode. In RAD I've setup several most used commands as external tools (commit, pull, log and command line). I also added these commands to file manager (with Classic start menu app even Windows explorer allows to setup custom commands and place them on toolbar)

Edited by Fr0sT.Brutal

Share this post


Link to post
55 minutes ago, Dany Marmur said:

Visual Code + a select extension can provide a very good UI to both Git and SVN.

Just so long as VS Code doesn't auto uninstall every fortnight like it does with me......

Share this post


Link to post
13 hours ago, Anders Melander said:

Reminds me of the time I tried to teach the great grandparents to use a mobile phone...

You reach an age where you really don't want to learn new stuff.  I had one of the first brick sized mobiles back when UK mobile phone numbers were six digits long, but only got a modern smart phone four years ago, had to catch up.

 

Angus

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×