Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 6:57 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Use Git for version tracking
PostPosted: Sat Dec 01, 2007 7:28 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
Following today's patch from asilby, I would like to bring the issue once again for discussion:
IMHO we should all agree to use git as a version tracking tool for this project.

Its huge advantage over SVN is that each one of us can keep their own private version (for example company logos and custom hacks) in their repo, without breaking the compatibility with trunk patches.
Then, we will be able to exchange patches (or sync with eachother) in a seamless manner.

I personally already use it. It helps me track the exact version I run on my production systems, and still develop on a highly-experimental branch. I keep it synced with the SVN trunk, too.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 7:37 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
If Git can do that, than I like it. I'm maintaining tons of useful stuff (useful for us) that we want to keep whether they are approve and merged in a2b or not and we have to be very careful while doing patches or we will look out changes. I will check that out for sure.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 7:59 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
asiby wrote:
If Git can do that, than I like it. I'm maintaining tons of useful stuff (useful for us) that we want to keep whether they are approve and merged in a2b or not and we have to be very careful while doing patches or we will look out changes. I will check that out for sure.


If you do, you could jumpstart by cloning my git instead of importing from SVN again. This will also help us maintain git coherency.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 8:05 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I have done a quick reading, and I haven't seen yet the feature that you have described. And if I clone your git, I will loose my changes. Are git and SVN compatible at some level? Cause if we use it and the A2B project doesn't, then the problem is not solved, is it?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 8:14 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
Both features have to do with git's core design:
Each git instance is both an autonomous repository and a reference point for the other git's.
That is, if you want to work on a2b source, say, you will "clone" somebody other's git. Then, your copy will be a repository, too. There, you can have any changes you wish. But, later on, you can push back those changes, or any part of the changes you want.

You will not lose any changes: First of all, you can checkout any svn branch into git. Then, you can apply all those changes you have locally on that. Alternatively, you can just copy your version of the files on top of the git repo and tell it "this is my version, make it appear as a branch of the original". Of course, you will first work on a new directory and not on the old where you had your changes.

Git is also both-way compatible with SVN. It does import automatically from SVN, but can also commit to a SVN branch. Sadly, I have been using the "old" version called 'svnimport', which cannot do commits. This means that I can still format and send patches to the SVN, but manually.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 8:24 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
That sounds great but branches can be created in SVN too, right? Why can't I just create a branch for my stuff on SVN? How different will that be from Git's approach? Currently I only using TortoiseSVN, I haven't decided to install Subversion yet.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 8:29 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
If you are using SVN, when you commit, you MUST commit to the master server (even when you are talking about a branch). You will need write access and your changes will be public.
With git, you commit locally, on your hard disk. Then, whenever you feel appropriate, you pass those commits to the others, in a controlled manner.

That makes a huge difference. With git, *you* are the master of your repo.

Additionally, git makes it very easy to branch and then merge back some work onto another branch. There is essentially no "trunk", but many branches that merge with each other. Thus, you get to keep your work yours.


Last edited by xrg on Sat Dec 01, 2007 8:31 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 8:32 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
That's what I'm talkin' about. You have touched the sensitive spot. Where do I start? :lol: :lol: :lol: :P :P :P

Added after 1 minutes:

And what do I need (hardware wise). Can it be simply on my Windows Freak'n Vista laptop that I am stuck with? Or will it be best on a Linux server?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 8:45 am 
Offline

Joined: Thu Oct 19, 2006 9:56 am
Posts: 300
Location: Athens, Greece
You can first read a bit on http://git.or.cz/ http://git.or.cz/course/index.html for the tutorials.

I'd suggest that you first try to build a test repo and put a few dummy files there, so that you get accustomed to git.

Note that, for every repo you have, it's essential that you configure your name (according to the tutorials). You must make sure that your changes get marked with your name!

Then, clone my public repo: http://pefnos.homelinux.org/pub/repos/a2billing.git/
and start working on a2b!
Git is very keen with errors: it will always let you go back and correct them.. Don't be afraid to hack anything.

Added after 2 minutes:

asiby wrote:
And what do I need (hardware wise). Can it be simply on my Windows Freak'n Vista laptop that I am stuck with? Or will it be best on a Linux server?


Git was developed by Linus Torvalds. I think that should answer your question 8)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 01, 2007 8:48 am 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
I was already reading it. I have also notice the a simple "emerge git" will install it on gentoo :lol:

Thanks for the tip. I will read the tutorials and get used to git before doing serious with it. :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 09, 2008 3:35 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
asiby wrote:
I was already reading it. I have also notice the a simple "emerge git" will install it on gentoo :lol:
You expected otherwise? :twisted:

I don't know how this thread has escaped my attention for so long. How are you getting on with git? I must admit due to having a very usable private subversion+trac repository (almost as easy to install on Gentoo as git) I've not spent as much time looking at git as I should have.

I appreciate you prefer git, xrg. From a technical standpoint, so do I. Verily! It's a far superior solution in every possible way. For the moment, however, I shall continue to use my SVN repo, and the 'svn merge' command to easily apply changesets/patches to the various branches within it.
The Svn book's section about 'vendor branches' describes what you need to in order to be able to easily merge changesets to Areski's repo into your own private repo. Doing the opposite is even easier.

By means of demonstration I should point out that I have xrg's git repo as a vendor branch in my own svn repo so I'm now enjoying easily extractable history of commits there too. There are only four drawbacks compared to using git directly that I'm aware of:
1) for history earlier than when I initially imported your vendor branch I have to resort to using gitk/gitview.
2) i have to update my vendor branch once for each revision up to the most recent commit, unless I'm happy with collapsing your history a bit.
3) the speed: with a system with little free RAM and/or slow storage performing the svn vendor branch dance is at least 2-3 orders of magnitude slower than git's blink-and-you'll-miss-it responses. Honestly. Even on the initial clone (over a network) git was finished so quickly I thought it must have failed!
4) repo size. in six months mirroring Areski's repo's history closely, and making 500 revisions myself my repo has grown from ~150MB to ~300MB. Almost all of this is due to the vendor branch method being very wasteful of space.
3 & 4 combine to encourag merging trees less frequently to minimise repo disk space bloat, not A Good Thing.
I have an idea for a few lines of Bash to workaround 4) completely, and greatly speed up 3), yet still keep the door open for easy merging and maintain complete history.. I'm surprised the SVN devs didn't implement it, as it seems fairly obvious and I can't see how it could fail. I can't find any record of them having discussed it. I'm hoping it will be lightweight enough to consider running a svn vendor branch merge triggered by an RSS feed of new commits to areski's tree.

Another factor in my desire to stick with svn for my personal usage for a little while yet is the installer. Some of you may have seen the A2B installer script I have been honing over the past weeks. For those that haven't, it supports near seamless upgrades of A2B, even on live systems (I do it regularly). I'm just adding support for updating (and creating) the SQL schema automatically. That will work for upgrades from release tarballs, but if you install from a svn working copy it has extra functionality to automatically update the minor SQL schema changes that can happen from revision to revision. In short to upgrade you should only have to type 'svn up && addons/install' and then ensure you merge changes to the configuration file, if instructed.


Top
 Profile  
 
 Post subject: Re: Use Git for version tracking
PostPosted: Sun Apr 25, 2010 5:35 pm 
Offline

Joined: Sat Jan 30, 2010 7:07 am
Posts: 7
Here's a video on Linus' view on git:
http://www.youtube.com/watch?v=4XpnKHJAok8


Top
 Profile  
 
 Post subject: Re: Use Git for version tracking
PostPosted: Thu Jun 24, 2010 8:55 am 
Offline

Joined: Thu Jun 24, 2010 7:36 am
Posts: 1
I will read the tutorials and get used to git before doing serious with it.
I like this thread. It ought to be made a sticky and a must read to all newbies.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group