Once you start getting accustomed to GIT it becomes quite addictive. I have started using GIT on another project. Despite using use only a fraction of it I have found it so fast and flexible that I have decided to move the Cello project over to GIT.
To install Git on your machine the easiest way to go is to use MacPorts. MacPorts is a cunning system that will install a package and all it's dependent packages, downloading, building and linking as necessary like magic. Once you have installed MacPorts installing a package like GIT is a breeze. Pop open the terminal and type
$sudo port install git-core
To import a CVS project into GIT you will need to install cvsps. Again this can be done with MacPorts
$sudo port install cvsps
And you are good to go, well to migrate your CVS repository to GIT. For me the following command imported the project in its entirety
$git cvsimport -v -C path_to_my_git_repositry my_module
Showing posts with label Source Code Management. Show all posts
Showing posts with label Source Code Management. Show all posts
Sunday, March 22, 2009
Saturday, May 10, 2008
Boost - Standing on Giants' Shoulders
I have just downloaded the latest release of Boost and checked it into the CVS repository for the Cello project. Boost starts where STL leaves off - and allows you, as a programmer, to stand on the shoulders of giants.
Boost is huge - checking it in manually once took a friend of mine the best part of a day (CVS won't let you check in recursively). I was fortunate to find the following commands that will recursively add to CVS under OSX in Torsten Curdt's blog.
Boost is huge - checking it in manually once took a friend of mine the best part of a day (CVS won't let you check in recursively). I was fortunate to find the following commands that will recursively add to CVS under OSX in Torsten Curdt's blog.
find . -type d -print | grep -v CVS | xargs -n1 cvs addThe first command adds the folders from the current directory - the second one adds the files. The standing on Torsten Curdt's shoulders saved a huge amount of time.
find . -type f -print | grep -v CVS | xargs -n1 cvs add
The other thing you can do is to just deploy the parts of boost you are using Alex Ott's blog details this.
The MFC version of Cello does not use Boost (the code is reasonably old) - I decided to add it to the project as I need to have some objects that are managed with owner counts and shared_ptr is ready rolled and works well.
The MFC version of Cello does not use Boost (the code is reasonably old) - I decided to add it to the project as I need to have some objects that are managed with owner counts and shared_ptr is ready rolled and works well.
Sunday, May 4, 2008
CVS and Cutting the first Strings
I have created a new CVS repository and checked in the original sources. CVS is not the best control control system but it is not bad and does the job. I had at the outset thought about getting the project professionally hosted - there is some good Trac SubVersion hosting out there - but for the moment I will save the money.
I have started working through some of the utility classes and getting them to build. The code is well organized, structured and generally well commented. Coming from a long legacy project which in reality is a bit out of control working with code like this is a real breath of fresh air. I was fortunate enough to have spent a day looking at the code before buying into it, during that initial review I could see that it was well written and of a high quality. The most daunting aspect of it all is the shear quantity - there are hundreds and hundreds of files.
My first step is just to get things to compile. There are a few fun and games with templates as gcc is quite strict. There are (obviously) a lot of types defined in MFC - things like BYTE DWORD etc. I am making some stub headers with the minimum of declarations in them.
I have taken the MFC CString class and turned it into a wrapper for a CFStringRef - the code has it's own string class and it occurs to me that down the road I might consolidate them. The windows version of Cello is not Unicode which is something that down the line I will want to change. Making CString a wrapper for CFStringRef is a start - and those parts of the interface to CString that are char * I am scoping in a #ifdefs so that down the line I can flip the define, have my build break and work through the the compiler errors. The other thing is that the CFString is when I come to the UI a NSString - ready for cocoa.
I have after a good days work got 8 files compiling - the first took half a day but it gets quicker!
I have started working through some of the utility classes and getting them to build. The code is well organized, structured and generally well commented. Coming from a long legacy project which in reality is a bit out of control working with code like this is a real breath of fresh air. I was fortunate enough to have spent a day looking at the code before buying into it, during that initial review I could see that it was well written and of a high quality. The most daunting aspect of it all is the shear quantity - there are hundreds and hundreds of files.
My first step is just to get things to compile. There are a few fun and games with templates as gcc is quite strict. There are (obviously) a lot of types defined in MFC - things like BYTE DWORD etc. I am making some stub headers with the minimum of declarations in them.
I have taken the MFC CString class and turned it into a wrapper for a CFStringRef - the code has it's own string class and it occurs to me that down the road I might consolidate them. The windows version of Cello is not Unicode which is something that down the line I will want to change. Making CString a wrapper for CFStringRef is a start - and those parts of the interface to CString that are char * I am scoping in a #ifdefs so that down the line I can flip the define, have my build break and work through the the compiler errors. The other thing is that the CFString is when I come to the UI a NSString - ready for cocoa.
I have after a good days work got 8 files compiling - the first took half a day but it gets quicker!
Labels:
Core Foundation,
MFC,
Source Code Management,
Unicode
Subscribe to:
Posts (Atom)