views:

78

answers:

1

Greetings,

I have been working a project in XCode for a while. I have been using xcode snapshots as a rudimentary version control. However, I have decided that it's about time I moved up into a real SCM system, so I plan to create a repository and import my project into SVN.

My question is: Is there anyway to import my snapshots history into SVN so I have a full history of my previous (snapshot) changes in the new SVN project repository I am creating?

Any info would be greatly appreciated.

Thanks.

+1  A: 

I suppose that by saying snapshot you mean that you stored whole project tree in different folder or created some kind of archive. In this case here are steps you'll need to follow:

  1. Init your repository (with svn admin command)
  2. Import the most earlier snapshot (let's name it s1) into repository
  3. Commit your changes
  4. Change your working copy files to contain next snapshot (s2)
  5. Commit your changes
  6. Repeat steps 4-5 for all snapshots (from s3 to sN)
  7. At the end you will have your whole history of snapshots in your repository

There is also such notion as changeset or diff or patch. In the case when you stored diffs instead of snapshots, workflow will be a little bit different. Instead of just copying snapshot to working copy (on step 4) you will need to apply corresponding patch (diff) to working copy.

altern
True enough, but step 4 may not be as simple as it sounds. One must take care to make sure additions, deletions, renames, and moves are all handled properly for version control system that want to be explicitly told when such an action happens (this is greatly simplified when using purely content-based systems like Git). A tool like svn_load_dirs http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html#svn.advanced.vendorbr.svn_load_dirs can help a bit with this.
Chris Johnsen