Mike Torrettinni 198 Posted July 22, 2020 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
haentschman 92 Posted July 22, 2020 Hi... Quote I'm not using any typical source control systems ...in japan they say "harakiri" to that. Quote I feel like I need to switch to proper solution YES! 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 1 1 Share this post Link to post
Lars Fosdal 1792 Posted July 22, 2020 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. 1 Share this post Link to post
A.M. Hoornweg 144 Posted July 22, 2020 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. 2 1 Share this post Link to post
haentschman 92 Posted July 22, 2020 (edited) Quote only do it with Tortoise. ...yes. Example: Tutorial in German from jaenicke: https://entwickler-ecke.de/topic_Kurze+Einfuehrung+in+Versionsverwaltungen+am+Beispiel+von+Git_115462,0.html Edited July 22, 2020 by haentschman Share this post Link to post
Mike Torrettinni 198 Posted July 22, 2020 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
aehimself 396 Posted July 22, 2020 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
Mike Torrettinni 198 Posted July 22, 2020 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
Lars Fosdal 1792 Posted July 22, 2020 1 minute ago, Mike Torrettinni said: Does Git have an option for full GUI tools to work with? Several. https://git-scm.com/download/gui/windows 1 Share this post Link to post
haentschman 92 Posted July 22, 2020 (edited) Quote Does Git have an option for full GUI tools to work with? ...see TortoiseGIT ...example before. https://www.google.de/search?q=tortoise+git&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjU-Luqh-HqAhUmNOwKHYBpDDgQ_AUoAXoECBcQAw&biw=1867&bih=964 Edited July 22, 2020 by haentschman 1 Share this post Link to post
MarkShark 27 Posted July 22, 2020 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. 1 Share this post Link to post
Mike Torrettinni 198 Posted July 22, 2020 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
Stefan Glienke 2002 Posted July 22, 2020 Backup/restore of a remote git repository is simply backup/restore of a file system folder 1 Share this post Link to post
David Heffernan 2345 Posted July 22, 2020 As for backups with git you can use a cloud repo in addition to any local ones to give you extra redundancy. 1 1 Share this post Link to post
Arnaud Bouchez 407 Posted July 22, 2020 (edited) 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 July 22, 2020 by Arnaud Bouchez 1 Share this post Link to post
Mike Torrettinni 198 Posted July 22, 2020 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
Rollo62 536 Posted July 22, 2020 (edited) 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 July 22, 2020 by Rollo62 Share this post Link to post
Mike Torrettinni 198 Posted July 22, 2020 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
David Heffernan 2345 Posted July 22, 2020 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. 5 Share this post Link to post
Mike Torrettinni 198 Posted July 22, 2020 21 minutes ago, David Heffernan said: git is everywhere, and has so much tooling and resources available Good point, thanks. Share this post Link to post
Mike Torrettinni 198 Posted July 22, 2020 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: which is stored in _history folder of source? So, you don't switch this off when using Git? Share this post Link to post
Attila Kovacs 629 Posted July 22, 2020 25 minutes ago, David Heffernan said: it's not widespread Like Delphi? 1 Share this post Link to post
Vincent Parrett 750 Posted July 22, 2020 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
Vincent Parrett 750 Posted July 22, 2020 8 hours ago, Mike Torrettinni said: Does Git have an option for full GUI tools to work with? Plenty, this is my current gui of choice - https://git-fork.com/ 4 Share this post Link to post
Vincent Parrett 750 Posted July 22, 2020 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