Home » Blog
date 5.Jun.2016

■ Tortoise SVN source control migration to new PC

As a one-man-show I use TSVN for version control in the most basic fashion, without subversion. Only the TSVN client is installed, and the repository is local, as are the working folders for the various commercial projects (xplorer², deskrule, etc). The structure goes like this:

After my recent hardware upgade I couldn't find any information on how to migrate the TSVN repositories to the new laptop. Most google articles referred to networked multi-user source control environments, using subversion console commands, but the single user scenario was nowhere to be found. Surely it should be something trivial like copying the repository and working folders to the new computer? Not quite. My migration had several complicating factors:

  1. From a 32 bit windows 7 to x64 windows 10 system
  2. Slightly different directory structure (folder names changed)
  3. TSVN upgraded from v1.7.x to the latest 1.9.4.

TSVN guys every now and then do a major change of the database format, and there was one with version 1.8, requiring a one-way upgrade. Once you upgrade, there's no going back to using the older TSVN version. Anyway, folders were copied to the new computer, but there was no indication that TSVN recognized the repository or the working folders. The .SVN folders were there but unheeded. After RTFM and searching the tortoisesvn forum, I was none the wiser, not even regarding the correct term to search for: is it migrate, import, relocate, switch or revert? or something else?

I had a hunch for the relocate command but there was no such menu to be found. In fact there was only one TSVN command listed in the shell context menu called Upgrade working copy. This was certainly to change the repository format to the new version 1.9 and no going back. Rather unsettling and without any promise of progress to relocation. TortoiseSVN forum denizens are newbie-eating monsters quick to pounce at subversion amateurs and have a laugh at their expense. Rather than risk riducule I decided to take my chances and issued the Upgrade working copy menu command on one of the working folders. Bang, after the conversion, relocate working copy command appeared, and I was able to correctly point to the changed main repository path using a local file:/// as the URL. Immediately TSVN woke up and I could see the familiar overlay icons, use the context menu e.g. to "Diff with previous version" and all other TortoiseSVN goodies.

That wasn't too hard after all... or was it? After a few days, when I tried to check in (commit) some source code changes, I got one funny error after another:

Commit failed (details follow):
Can't create directory 'E:\blah\SVN repositories\deskrule\db\transactions\29-x.txn': 
The system cannot find the path specified.

Things hadn't gone swimmingly after all. It was the combination of factors 2 and 3, causing the TSVN format upgrade to partially fail (without any warning) because the repository wasn't connected. It was a chicken-and-egg type of problem and a few folders weren't created under the main repository. So I went and created the missing folders DB\TRANSACTIONS and DB\TXN-PROTOREVS for each project under source control. But commit still failed:

Unable to create pristine install stream
The system cannot find the path specified.

Eh? Thanks to google I found another guy that had the same cryptic problem and had discovered the solution too: create a folder called .SVN\TMP in the working copy folder. After that, commits would succeed. Success at last. One last detail remained to setup exclusion filters so that TSVN didn't try to commit changes to EXE and other irrelevant files. That can be done for all projects using Global ignore pattern tortoiseSVN setting.

That's the end of the migration experience, everything is in order and hopefully it will be a good 5 years before I have to go through the migration hassle again :)

Post a comment on this topic »

Share |

©2002-2016 ZABKAT LTD, all rights reserved | Privacy policy | Sitemap