Author Topic: Need some pointers to using CVS with my own code  (Read 3462 times)

Offline weedenbc

  • Single posting newcomer
  • *
  • Posts: 3
Need some pointers to using CVS with my own code
« on: January 10, 2008, 04:11:21 pm »
I've been doing some simple C programming a few years but never anything more than a couple thousand lines, always just one source file and I have never used CVS before.  But I want to learn how CVS works and get used to it before I start a new major project.

The main reason I want to start using CVS is that I'm running into problems where I delete some code to fix an algorithm but then realize I need some of what I had originally written back.  I'm sure a lot of you are familiar with this problem and I have been told CVS is the solution I need.  I realize that the main purpose of CVS is to handle multiple people making source changes at the same time but I'm assuming it can help with my "undo" needs as well.  I'm also looking to get involved in an OSS project and I want to be familar with how CVS works before jumping headfirst into it.

So how would I get started?  I'm assuming I need to install the CVS plugin for C::B.  What about the repository?  Can I simply use a directory on my hard disk or do I need to install some CVS software to manage it?  Oh, and I'm currently using Windows XP as Gutsy does not play well with my laptop.  How about if I wanted to create a project page on Sourceforge?  Would it be easier to host the CVS there?

Any advice and/or pointers to wikis, FAQs, etc would be much appreciated.  Thanks!
« Last Edit: January 10, 2008, 04:23:40 pm by weedenbc »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Need some pointers to using CVS with my own code
« Reply #1 on: January 10, 2008, 05:43:37 pm »
Quote
So how would I get started?
You'd get started by launching Google and searching for "cvs documentation", this will inevitably get you to the official manual ("the Cederqvist"). The manual describes everything from how to install on 250 different platforms, how to use the clients, how to do it properly, and how to set up a server.

Before you do that, you may want to be sure that CVS is really what you want to use. There are about a dozen version control systems available on the net, and most of them are better than CVS for most people.
The approach is the same, only replace the word "cvs" with "svn" or "subversion", or something else.

You may also want to look for a graphical client, such as TortoiseCVS (or TortoiseSVN), as these make your life a lot happier. There is at least a dozen of these available on the internet, too.

Then, if your sources are open, you will probably want to use Sourceforge or BerliOS, or Googlecode, or one of the many free hosters, as you don't have to bother setting up the server, and you don't pay for the bandwidth. If it's about your own, private stuff, you will want to set up your own server or use a local filesystem repository.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline weedenbc

  • Single posting newcomer
  • *
  • Posts: 3
Re: Need some pointers to using CVS with my own code
« Reply #2 on: January 10, 2008, 07:19:37 pm »
Sorry about that - I forgot to add the important piece about why I posted here.  How can I use CVS or SVN with Code::Blocks?  I'm fully aware of Google and didn't mean to sound like an idiot.  But googling gets me a lot of pages on how to compile C::B from CVS/SVN and I'm looking for how to use CVS/SVN with it.

I thought I saw that there was a plugin but the Plugin wiki page doesn't list it and I didn't see a plug-in forum.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Need some pointers to using CVS with my own code
« Reply #3 on: January 10, 2008, 07:25:23 pm »
There is currently one working Subversion plugin: http://forums.codeblocks.org/index.php/topic,7063.0.html

I don't know about CVS. My old Subversion plugin for RC2 some 3 years ago did support some CVS, but CVS proved such an awful lot of pain that I dropped the plugin alltogether shortly after.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."