Jump to content
Mike Torrettinni

Why should I use good source control versioning system?

Recommended Posts

I'm not using any typical source control systems, like TFS, GIT... I use manual backups, but I feel like I need to switch to proper solution. I'm not sure if I really need it, and is Delphi IDE really ready to work with real source control?

 

Share this post


Link to post

Hi...

Quote

I'm not using any typical source control systems

...in japan they say "harakiri" to that. :classic_huh:

Quote

I feel like I need to switch to proper solution

YES! :classic_tongue:

Quote

is Delphi IDE really ready to work with real source control?

...imho not. The features in the IDE are are too little. Better you use other tools like Tortoise for (GIT, SVN) ...what you like.

https://tortoisegit.org/

 

Tutorial: https://www.youtube.com/watch?v=N1KNw1tr47k

 

  • Like 1
  • Thanks 1

Share this post


Link to post

From the other thread
 

24 minutes ago, Lars Fosdal said:

Why revision control...
- Tracking changes - what is the change history of a unit? (Yes, you SHOULD write commit comments)

- Comparing changes between current version with any previous version

- Comparing changes between any previous version and another previous version

- Automatic merging - ensuring that every little change makes into the other branch

- Rolling back to a previous version if your changes turned out to be crap

- Linking code changes to your issue management system such as Jira

All at a click of a button, no manual tinkering, and not requiring multiple team members

 

Taking it one step further - using f.x. Continua CI which is available in a free version limited to one task at a time, every time you commit a change, you can 

- Automatically build of each of the changed branches

- Automatically run unit tests and integration tests

- Automatically do translations, code signing, packaging, deployment to wherever you need to deploy

- Export snapshots to your offsite backup system

 

Yes, you can do manual zip archiving of code revisions - but man, they invented the wheel!

 
 

 

FWIW, we don't use the built-in version control integration in Delphi.  We tried way back when it was new, but it just didn't work out for us as it didn't allow merges.

We use TortoiseSVN, Github Desktop/SourceTree.

Update from repository, start Delphi, do the work, exit Delphi, Commit, Merge if necessary.

 

I am a creature of habit, so I have a root checkout folder:

C:\src\Programs

 

This contains the branch of my apps that I am currently working on i.e. typicallly trunk in SVN speak, or dev in git terms.

C:\src\Programs\App1

C:\src\Programs\App2

C:\src\Programs\App3

C:\src\Programs\Common
etc.

 

I also have other versions in separate folders that I update regularily

C:\src\Programs.Live

C:\src\Programs.Pilot

C:\src\Programs.Trunk

C:\src\Programs.ThatVersionThatNeverGotReleased

 

If I need to work on f.x. the Live branch, I used the Switch feature in Tortoise to switch the branch in C:\src\Programs. Why don't I just work with the files in their respective check-out folders?

Because of Delphi file history.  It is so freaking annoying to open a file from the history list and get a file from the wrong folder.

 

With SVN, I commit my changes from C:\src\Programs, and if the changes also should be merged with a different branch, like f.x. Live - I ensure that folder is updated, and merge to it, and then commit it.

 

We are going to make a move to using git for everything, but we are still trying to come up with a robust and easy to use workflow.  Git is a little more finickey for us long time SVN users.

 

  • Thanks 1

Share this post


Link to post

YES you need it. With a  source control system you can make as many backups (commits) per day as you want and you can return to any older version of a file if you broke something.

 

A few tips:

- There are very good freeware GUIs available (such as TortoiseSVN and TortoiseGit).  Please use those, they save a lot of hassle.

- I personally don't let the Delphi IDE manage the files in the repository, I prefer to do it manually.  I use both svn and git, but I use them exclusively using the aforementioned tools.

- It isn't really necessary to use an external server for your own (non-shared) repositories.  An external USB drive will do just fine.  

- Whenever you want to add/delete/move/rename a file in your working copy, don't do it with the Windows explorer, only do it with Tortoise. 

  • Like 2
  • Thanks 1

Share this post


Link to post

I use TFS 2012 (not for Delphi) and Source Control Explorer (or Microsoft Team Explorer) is very easy to use. Anybody using it, overkill or not enough features for Delphi projects?

Share this post


Link to post

Overkill and requires a heavy backend. Git is free and you can create your upstream repository on a backed up fileshare.

More than enough, especially if you are new to source control.

Share this post


Link to post
5 minutes ago, aehimself said:

Overkill and requires a heavy backend.

I have it installed locally, I don't even notice it until l use it. But that doesn't mean is light-weight.

 

Does Git have an option for full GUI tools to work with? I would like to avoid command line as much as possible.

Every now and then I need to branch and merge 10s of branches a day - in TFS this is a breeze. A customer once showed how they do it with Git and he got confused on feature switch with just 3 branches, it didn't look fun.

Share this post


Link to post

TortoiseHg has a nice interface.  When I needed Git last month I installed TortoiseGit but found it didn't seem to have the same type of user interface (I'm no version control expert, so I appreciate a gui for it.)  I then tried SourceTree and it seems like a good solution to work with both.

  • Thanks 1

Share this post


Link to post

Great suggestions, thanks!

 

How about backups, is it easy to backup the project source, or you need to keep TFS/Git backup?

In case computer crashes and I need access to the project sources, before I setup TFS/Git again, can you do daily/weekly project backups, where the full source is standalone and doesn't require TFS/Git to run?

 

 

 

Share this post


Link to post

As for backups with git you can use a cloud repo in addition to any local ones to give you extra redundancy.

  • Like 1
  • Thanks 1

Share this post


Link to post

For a small and efficient Source Control Management system, even stand-alone with no server, you don't need git, tortoise and whatever...

Just try https://fossil-scm.org/home/doc/trunk/www/index.wiki

 

Only a 2MB download, for a full-bloated distributed SCM, with integrated web server, wiki and tickets.

Perfect for any size of projects.

It was made by the SQLite3 author, and I use it since years.

 

Git was meant for Linux. Fossil was made for SQLite3.

Ensure you read https://fossil-scm.org/home/doc/trunk/www/concepts.wiki
and https://fossil-scm.org/home/doc/trunk/www/fossil-v-git.wiki

 

Edited by Arnaud Bouchez
  • Thanks 1

Share this post


Link to post
33 minutes ago, Arnaud Bouchez said:

For a small and efficient Source Control Management system, even stand-alone with no server, you don't need git, tortoise and whatever... 

I will look into this one, too. Thanks!

Share this post


Link to post

But better use GIT then, this also runs standalone just copying 1:1 on a network folder.  

Same Features, same EXE, makes it easy to scale up .

 

Edited by Rollo62

Share this post


Link to post
40 minutes ago, Rollo62 said:

But better use GIT then, this also runs standalone just copying 1:1 on a network folder.  

Same Features, same EXE, makes it easy to scale up .

 

You are referring to Fossil vs Git, right?

Share this post


Link to post

Fossil would be a weird choice. Regardless of how good it is, it's not widespread. git is everywhere, and has so much tooling and resources available. Very hard to see past it. 

  • Like 5

Share this post


Link to post
7 hours ago, Lars Fosdal said:

Delphi file history.  It is so freaking annoying to open a file from the history list and get a file from the wrong folder

Are you referring to this history - in IDE:

image.png.dde2c1b9de13ac2cc6d506491ec19e8f.png

which is stored in _history folder of source?

 

So, you don't switch this off when using Git?

Share this post


Link to post
9 hours ago, Mike Torrettinni said:

I use TFS 2012 (not for Delphi) and Source Control Explorer (or Microsoft Team Explorer) is very easy to use. Anybody using it, overkill or not enough features for Delphi projects?

Old style TFS is on its way out.. microsoft have pretty much deprecated it now in azure devops.. they use and encourage the use of Git instead. 

Share this post


Link to post
9 hours ago, Lars Fosdal said:

Because of Delphi file history.  It is so freaking annoying to open a file from the history list and get a file from the wrong folder.

Are you not excluding the history from version control? If not you really should. 

 

I look at it as a session thing, what change(s) did I make since my last commit - my colleagues do not care about that so why burden them with it by adding it into version control? 

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

×