Moving the Repository
Moving a repository to a new computer requires three steps.
- Dump the repository's contents to a file.
- Create a repository on the new computer.
- Load the repository with the contents of the dumped file's contents.
svnadmin dump RepositoryName > DumpFile
Running svnadmin dump like I just did will write the contents of your repository to a file called DumpFile. Ideally you would dump the repository contents before you get your new computer and copy the dump file to your new computer. But I was able to copy my repository folder to the new computer and run svnadmin dump on the new computer.
After creating the dump file, run the command svnadmin create to create a new repository. Navigate to where you want the repository to reside and enter the following command:
svnadmin create RepositoryName
Now it's time to fill the newly created repository with the contents of the dump file. Run the command svnadmin load to fill the repository.
svnadmin load RepositoryName < DumpFile
Now you've managed to copy the repository over to the new computer.
Changing the Repository's Path
After recreating my old repository, I opened an Xcode project that was in the repository to see if the version control information was appearing in Xcode. The only information that was appearing was the files' local revision numbers. There was no information on previous versions of the project's files.
The cause of the problem was the repository path on the new computer did not match the path on the old computer. I needed to tell the files in the repository the new path to the repository.
The svn switch command accomplished this task. To tell the files the new repository path, move to the directory where the project's files reside and run the svn switch command using the --relocate option. When using the --relocate option, you first supply the old repository path, then the new path.
svn switch --relocate /Path/On/Old/Computer /Path/On/New/Computer
After running svn switch, all the version control information began to appear in Xcode.