Wednesday, July 29, 2009

Importing CVS into SVN with history

Converting old CVS repos and their history is a question that always comes up. So heres a mini-howto convert cvs to svn and preserve the history.

Firstly install cvs2svn, on Debian based distros you can grab it with apt:
sudo apt-get install cvs2svn

cvs2svn can also be downloaded from http://cvs2svn.tigris.org/

First we need to setup a place to work and create a CVSROOT dir else cvs2svn wont be happy.
mkdir -p ~/oldcvs/CVSROOT
mkdir ~/newsvn/

Now lets copy the CVS repo's data into ~/oldcvs/modulename
cp -r /path/to/cvs/modulename /home/user/oldcvs/modulename
cvs2svn --encoding=iso8859_10 --dumpfile=/home/user/newsvn/modulename.SVN ~/oldcvs/modulename
for Encodings check http://docs.python.org/library/codecs.html#standard-encodings
also dumpfile didnt like the ~ in the path so full path needed here!

If all goes well you should end up with a nice report of all the revisions and their mother.
Now we need to import our newly create .SVN file into subversion, in my case I need to create a new project for it aswell like so:
svnadmin create /path/to/svn/repos/modulename

Then just import the dump into our SVN repo we created earlier
svnadmin load /path/to/svn/repos/modulename <~/newsvn/modulename.SVN

All done.
Due to the unavailability of cheap iPhone 3G's in Sweden, I nabbed one in a second hand store in Switzerland for 300 CHF ( 2200 SEK ) and another two online for about 3000 SEK each.

Each phone was locked to some or other provider. Here is my experience in jailbreaking and unlocking a Swisscom locked iPhone 3G.

Firstly get-a-mac, I dont do windows and never will. You will need PwnageTool 3.0 for mac. Get it from one of these:
Procedure
  1. Update the iPhone to 3.0 via iTunes.
  2. Launch PwnageTool and click the expert button, click the iPhone 3G.
  3. You should see the 3.0 firmware in the main window, this is from the iTunes library actually so its trustable.
  4. Click the firmware for 3.0 and Next
  5. Click General and Next
  6. Check "Activate the phone", this makes the phone activate without the provider sim
  7. Check "Enable baseband update", this makes the the phone unlock-able via Cydia
  8. Resize the root partition to at least 700mb pref 1gb if you can spare that.
  9. Neuter bootloader should be unchecked
  10. under Cydia choose "manage sources" and add http://repo666.ultrasn0w.com
  11. Click next through Packages and Logos until you can click the Build button and then Next again
  12. Follow instructions in PwnageTool on how to put your phone into DFU mode
  13. Restore you custom image onto you iPhone via opening iTunes and hold down Option and click restore
  14. Choose your Custom firmware which was generated by PwnageTool
  15. And watch the jailbreaking process
Next we need to unlock your phone to access GSM network, quite easily, all you need to do turn off your 3G and open Cydia and search for ultrasn0w (thats a numerical ZERO ) and install it, reboot the phone and voila!