from the CVS to GitHib

Lately, I’ve been think­ing about the many com­plex­i­ties of being in the soft­ware indus­try, specif­i­cally design­ing for the web. Of course, in the past, I’ve talked about how lit­tle col­leges pre­pares one for the “real world” — and that’s a dif­fer­ent story.

If I haven’t lost you yet, I faced a recent chal­lenge in con­vert­ing a CVS code­base to a more mod­ern Git. Per­haps, you’re not sure what CVS or Git is, wel­come aboard.

In the world of soft­ware devel­op­ment, you end up mak­ing a file, or two, and a bunch of more files, even­tu­ally, you make changes, you hate you changes, you want to go back to a bunch of changes. Or maybe even more com­plex still, you’re work­ing with your friend on some folder with some files inside — how do you know your friend will not over­write your work. That is the prob­lem that soft­ware like Git or CVS help to solve, almost the same way that Microsoft Word helps write a bet­ter essay but I’m sure you’re not read­ing this to learn about Git or CVS… let’s get down to business.

It turns out that CVS is slow and not as ver­sa­tile as Git, the chal­lenge was con­vert 3 years worth of com­mits and changes to the newer Git and have it take advan­tage of the Awe­some GitHub, let’s get started.

1. You will obvi­ously need the CVS repo you will be con­vert­ing
and you will need file-level access. It took me a while to under­stand this since I never used CVS, basi­cally, you will need to be phys­i­cally in the folder that has “CVSROOT” in it. Hope­fully, you can login to the server, and the rest is cake from here.

2. I’m assum­ing you’re on Win­dows sys­tem:
a. Down­load Cyg­win, fol­low this guide to get setup (be sure to install the ‘git’, ‘svn’, and ‘python’ pack­ages, you need them to run the scripts that does the con­ver­sions).
b. Open up Cyg­win, hope­fully you’ve gone through the pre­vi­ous pages, and now let’s move on into the com­mand world.

3. a. Let’s down­load cvs2svn

1
svn co –user­name=guest –pass­word=”” http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk

b. Nav­i­gate to the folder:

1
 cd cvs2svn-trunk

c. Run the pro­gram that does the conversion:

1
2
3
4
5
cvs2git \
    –blob­file=cvs2svn-tmp/git-blob.dat \
    –dump­file=cvs2svn-tmp/git-dump.dat \
    –user­name=cvs2git \
    /path/to/cvs/repo

Some notes, on this mys­te­ri­ous look­ing things: this is just gen­er­at­ing a dump that can be imported into Git as we will do soon; hope­fully, every­thing goes well and you have those files (“git-dump.dat” and “git-blob.dat” generated)

4. Con­vert to git:
a. Cre­ate an empty git directory:

1
mkdir some_project.git

b. Nav­i­gate into the direc­tory and “git” it

1
2
cd some_project.git
git init –bare

c. Now import that dump we created

1
cat ../cvs2svn-tmp/git-blob.dat ../cvs2svn-tmp/git-dump.dat | git fast-import

5. Start using you files — no, we are almost done, the file we cre­ated pre­vi­ously where not actu­ally files yet, just “things” git under­stands, and how it store the con­tent of the files, now let’s gen­er­ate files we can use:
a. Nav­i­gate to the direc­tory you want it in, here we go “HOME

1
cd $HOME

b. Cre­ate the project files

1
git clone  /path/to/some_project.git

c. Now go into your folder:

1
cd some_project

(yes, with­out the .git)

We are all set, hack away. Oh, and there is the won­der­ful GitHub.

Related Posts:

  • No Related Posts

on Creating Luck

Last Sun­day (Mar. 11/2012), I thought about peo­ple and their achieve­ments. It’s funny how one bad luck can stick with one for­ever, or, how on good luck can stick for­ever — maybe I don’t even believe in luck that much, it’s there to say. For exam­ple, some chil­dren are born in a poor region of


…Above All, Love

There are a lot of things that indeed do make the world go round, I’m try­ing to choose the best, or the worse or maybe one day I will choose one. There are times when I’m decieved, there are times that I decieve myself, there are time that I don’t know which I am am,


Infesting a Passion

Last week Thurs­day (Feb 2nd,2011) I gave a talk at my alma mater using per­cus­sive drums to explain our con­nec­tion to music and rhythms, it was com­mem­o­ra­tive of black his­tory month. I have re-discovered myself. No, not in the sense of it being black his­tory month, or if I was expe­ri­enc­ing music for the first


Colchester Blues

A con­tri­bu­tion from my friend (who I hope wouldn’t be a stranger on here): I stand here Alone I smile at un-funny talks I laught at cold faces indif­fer­ent indif­fer­ent Cold cold Colch­ester Cold cold Ess­esx Excess of human piety Related Posts:No Related Posts


Generally, it’s a struggle

After writ­ing the pre­vi­ous post , my old friend from Nige­ria called as if he had read the pre­vi­ous post, he explained the hard­ship [he’s fac­ing] back home. Gen­er­ally, I thought, every­one thinks theirs is the worse until they hear some­one else’s story. I can com­plain about the reli­gion, school­ing and the fal­lacy of edu­cat­ing;


A Non-secretive World of Wealth

There’s an ironic thing about being educated–we’re sup­posed to be enlight­ened to lead a bet­ter life. Ulti­mately, some would argue that the point of edu­cat­ing is so they can have enough finan­cial free­dom to pur­sue their dreams, make more money and lead a happy life. At least, that’s the story I’m made to believe. But when


The Daily Practice of Living

James Althcher has inspired me to ulti­mately pur­sue 3 sim­ple things in life: a. Be Happy b. Erad­i­cate unhap­pi­ness c. Live the sim­plest life pos­si­ble. It’s almost impos­si­ble to archive any of these, as sim­ple as they seem. I’ve observed that as one grows through life, we con­tinue to amass unhap­pi­ness, iron­i­cally, in pur­suit of


On being Little…

Get it Now and Fast” was the title of the junk mail that made it into my email; it got me think­ing: “This explains why we are impa­tient these days.” Even I want every­thing here and now. In fact, that’s what our gen­er­a­tion has come to expect to lead our lives. To take a cue of


On the American Religion

One of the inter­est­ing things about liv­ing in the United States is the amount of oppor­tu­ni­ties that one encoun­ters, and also ironic is the cap­tiv­ity that these oppor­tu­ni­ties cre­ate. Some might want to call is civ­i­liza­tion — sure, it’s the land of free­dom, or so it seems. There are a few things that promise you the