Codementor Events

How and why I built Sahar for SVN

Published Oct 31, 2018
How and why I built Sahar for SVN

About me

I am an experienced full-stack software developer with over 2 decades in the field of Delphi and pascal programming.

The problem I wanted to solve

In "Sahar" i wanted to build a small utility to connect Redmine (open source flexible project management software) and TortoiseSVN (Subversion client on windows) in a very fluent way.

What is Sahar for SVN?

When you install "Sahar" on your windows beside TortoiseSVN, and then set up your working copy to connect the corresponding project in Redmine, then you will see a new button added to the commit page of TortoiseSVN. Clicking on this button will open a new window which is capable of taking your comments in a RichText editor and also shows some new buttons which can open some other windows to show you all issues in the project. All issues are cached on your pc and can be viewed or assigned to versions even when you are offline.

Tech stack

I used the Redmine REST api and Delphi datasnap technologies to connect Redmine. I also used the TortoiseSVN ActiveX protocol and created a custom standard ActiveX object for windows to be embeded in TortoiseSVN.

The process of building Sahar for SVN

Firstly i created the TortoiseSVN ActiveX and then created the basic GUI for it.
Then I started to create a special Delphi stub code to work with Redmine REST protocol and added the required GUI to get the user/password and save them securely in the windows registry.
Finally i created the required GUI for showing and selecting projects and issues from Redmine server.

Challenges I faced

Redmine REST protocol and adapting it to Delphi TFDTables took some time and debugging.

Key learnings

I learned how to create an ActiveX object for TortoiseSVN, how to use REST Api for Redmine servers and also offline saving and loading of issues on users pc.

I also found my "Sahar" utility very handy and shared it for some of my friends to test and use it. They and me are now addicted to "Sahar"!!

Tips and advice

Every one should use it to get the effect on programming performance.

Final thoughts and next steps

I created "Sahar" specially for Persian programmers and it is not ready for English or other nations. I should have some requests to internationalize it.

Discover and read more posts from shakifa
get started