问题
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:
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:
- Init your repository (with
svn admincommand) - Import the most earlier snapshot (let's name it s1) into repository
- Commit your changes
- Change your working copy files to contain next snapshot (s2)
- Commit your changes
- Repeat steps 4-5 for all snapshots (from s3 to sN)
- 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.
回答2:
This answer comes too late for you, but other finding this question my find it useful. I've written a post about exactly this topic: http://cinnamonthoughts.org/2011/03/14/moving-xcode-3-snapshots-to-subversion/
来源:https://stackoverflow.com/questions/2203818/is-there-anyway-to-import-xcode-snapshots-into-a-new-svn-repository