



I’ve been using Subversion(SVN) at work for any new projects that I start. The rest of my applications are all stored in Visual SourceSafe(VSS). I recently had to start adding some functionality to a couple of the VSS stored projects but I really wanted them to get migrated to subversion. So after doing some non-stack overflow searches (the stack overflow searches were very very pessimistic and “i give up”ish, I found a utility to do it for me… I found it at http://www.poweradmin.com/sourcecode/vssmigrate.aspx. (Note: The following is not an official historical record, merely a rough summarization). Quite a few people have added to this utility over the past year including: Jim Watters, Ricardo Stuven, Matt Palmerlee, Karl Zeift. And then Tim Erickson ported it to C# with his additions. Erik Lane worked on it and Erik and Tim put it on CodePlex where i96danma and jim0301 committed updates to it. Ok with the history out of the way, this tool is everything you probably need to migrate a VSS repository to SVN.
Before May 23, VssMigrate would re-create the check in history from VSS into SVN. But because of the way VSS works, which is one file per commit, the final SVN repository ended up not quite a perfect representation of the commit history. You might have committed 10 files in one batch, but VSS checks them in one at a time. In SVN we want that whole batch of 10 files to show as 1 commit and therefore rev up the repository only once. jim0301 updated VssMigrate to handle this situation perfectly. So now you can fully migrate with a very nice history. Even nicer than VSS held natively. Thank you jim0301.
Another nice thing about VssMigrate is it will remove all of the VSS bindings (all the hidden files for vss) and only migrate the real sources for your app.
I am going to go out on a limb and “assume” you are a developer and comfortable with source code. I can’t quite put my finger on any particular reasons why but I think it a safe assumption here. So go grab the latest source code from the trunk here. Click download on change set 16890 or above (16890 is the tip at the time of this post). or you could use the following command from a command prompt (with svn in your path):
svn co https://vssmigrate.svn.codeplex.com/svn/trunk vssmigrate
When you load the solution you will probably get a warning:
The referenced component ‘log4net’ could not be found.
Warning 5 Resolved file has a bad image, no metadata, or is otherwise inaccessible. “Could not load file or assembly ‘Path\lib\log4net\log4net.dll’ or one of its dependencies. The module was expected to contain an assembly manifest.
You can replace this one with a version from it’s home or direct link. Just overwrite the log4net.dll in /vssmigrate/src/lib/log4net/
To save you the trouble I have a copy of the source code with the re-referenced log4net file.
If you are on a 64-bit machine. Make sure to change the build configuration to x86 because there is no 64 bit library for the Visual Source Safe Interop and when you execute your app it will throw an exception that’s quite cryptic. To do this in Visual Studio do: Build –> Configuration Manager… –> Active Solution Platform = x86. Or on the Standard Toolbar change the “Any CPU” drop down list box to “x86”.
Now that you have it compiled we’ll start the walkthrough:
This should be broken up into two edits, pre-compile and post-compile. Edit the app.config in the solution pre-compile, and the VssMigrate.exe.config post-compile in the /bin directory for each migration. I would suggest setting the settings that won’t change i.e. user names and passwords and repository locations in the app.config so you don’t have to change them in the exe.config after every recompile.
VssMigrate.exe.config
1: <?xml version="1.0" encoding="utf-8"?>
2: <configuration>
3: <appSettings>
4: <!-- # VSS\\Win32 directory which contains ssapi.dll-->
5: <add key="VSSWIN32" value="C:\Program Files\Microsoft Visual Studio\VSS\win32\" />
6: <!-- #VSS repository directory (contains srcsafe.ini)-->
7: <add key="VSSDIR" value="\\server\path\" />
8: <!-- #VSS project to start at (ie $/Product)-->
9: <add key="VSSPROJ" value="$/Products/Gadget" />
10: <!-- #User to use for VSS commands, use blank for none-->
11: <add key="VSSUSER" value="vssuser" />
12: <!-- #password to use for VSS commands, blank is OK-->
13: <add key="VSSPASSWORD" value="" />
14: <!-- #User to use for SVN commands, use blank for none-->
15: <add key="SVNUSER" value="svnuser" />
16: <!-- #password to use for SVN commands, blank is OK-->
17: <add key="SVNPASSWORD" value="svnpw" />
18: <!-- #URL to use for the root of the check in-->
19: <add key="SVNURL" value="http://server:3690/svn/" />
20: <!-- #SVN project to start at (ie Product)-->
21: <add key="SVNPROJ" value="Products/Gadget/trunk" />
22: <!-- #SVN Repository directory (ends in [RepositoryName]\db\revprops\)leave blank for no user/date adjustments -->
23: <add key="SVNREVPROPSPATH" value="\\server\SVNRepos\Products\db\revprops" />
24: <!-- #Directory under which files and directories will be created as work progresses-->
25: <add key="WORKDIR" value="c:\Temp\VssMigrate" />
26:
27: <!-- Boolean setting for determining whether or not to actually perform the import
28: When set to false, the program will only show what files and/or revisions will be generated
29: When set to true, the program will perform the migration
30: -->
31: <add key="PerformImport" value="False" />
32:
33: <!-- Boolean setting for determining whether to go file-by-file and version-by-version or to discover
34: the revisions from the check-in history based on the dates, authors and comments as a key.
35: -->
36: <add key="DiscoverRevisions" value="True" />
37:
38: <!--
39: The window of time (in seconds) for multiple check-ins that may be considered a single revision
40: The key for the merge / revision is the "time,author,comment." Once all keys have been identified
41: the merge will move all files from a later revision into an earlier revision thereby
42: changing the time to the earlier revision. This happens iteratively.
43:
44: Ignored if DiscoverRevisions is false
45:
46: Additional notes:
47: End of lines and tabs are removed from comments and they are trimmed to determine the keys for merging / revisions
48: -->
49: <add key="MergeRevisionWindow" value="120" />
50:
51: <!--
52: Full Spec is passed into the regex's
53: e.g. inclusion => (\$/$)|(\$/Sub1(/Sub1A(/Sub1A2(/Sub1A2a)?)?)?$)|(\$/Sub1/Sub1A/Sub1A2/Sub1A2a.*)
54: Only one or none of the exclusion/inclusion regex pairs may be set
55: The regex's are case-insensitive
56: Reminder: escape the $/ to \$/
57: -->
58: <add key="VssFolderExclusionRegex" value=""/>
59: <add key="VssFolderInclusionRegex" value="" />
60:
61: <!-- e.g. inclusion => (\$/Sub1/Sub1A/Sub1A2/Sub1A2a.*) -->
62: <add key="VssFileExclusionRegex" value=""/>
63: <add key="VssFileInclusionRegex" value=""/>
64: </appSettings>
65: </configuration>
—–
Here are the lines that will should be changed Pre-Compile.
Line 5: Local VSS Client Install Directory
4: <!-- # VSS\\Win32 directory which contains ssapi.dll-->
5: <add key="VSSWIN32" value="C:\Program Files\Microsoft Visual Studio\VSS\win32\" />
This needs to be set to the local install of the VSS client. Look for your ssapi.dll file.
Line 7: VSS Repository Location
6: <!-- #VSS repository directory (contains srcsafe.ini)-->
7: <add key="VSSDIR" value="\\server\path\" />
Set the value equal to your VSS repositories where the srcsafe.ini file is.
Lines 11 and 13: VSS User and Password
10: <!-- #User to use for VSS commands, use blank for none-->
11: <add key="VSSUSER" value="vssuser" />
12: <!-- #password to use for VSS commands, blank is OK-->
13: <add key="VSSPASSWORD" value="Password" />
Lines 15 and 17: SVN User and Password
14: <!-- #User to use for SVN commands, use blank for none-->
15: <add key="SVNUSER" value="svnuser" />
16: <!-- #password to use for SVN commands, blank is OK-->
17: <add key="SVNPASSWORD" value="svnpw" />
Line 19: SVN Root URL
18: <!-- #URL to use for the root of the check in-->
19: <add key="SVNURL" value="http://server:3690/svn/" />
Line 25: tmp folder for migration
24: <!-- #Directory under which files and directories will be created as work progresses-->
25: <add key="WORKDIR" value="c:\Temp\VssMigrate" />
Make sure this folder exists.
Those 8 settings will probably not change unless you are working with multiple subversion or vss repositories with at multiple locations and with multiple user accounts.
Next the following 3 settings will change per project. You will execute VssMigrate.exe for each project after making these changes.
Line 9: VSS Project Root
8: <!-- #VSS project to start at (ie $/Product)-->
9: <add key="VSSPROJ" value="$/Products/Gadget" />
$/ is the root for all your projects. If you want to migrate all your projects you should do this one project at a time.
Line 21: SVN Project Trunk
20: <!-- #SVN project to start at (ie Product)-->
21: <add key="SVNPROJ" value="Products/Gadget/trunk" />
You may not have a SVN Repository created for you project yet. If not, go ahead and create one and then come back. If you are unsure how… maybe you shouldn’t be trying to import into SVN… but here is my walkthrough to get started.
Line 23: Physical location of SVN Repositories (used to update user and commit time)
22: <!-- #SVN Repository directory (ends in [RepositoryName]\db\revprops\)leave blank for no user/date adjustments -->
23: <add key="SVNREVPROPSPATH" value="\\server\SVNRepos\Products\db\revprops" />
Now your application configuration is all set.
Lines 36 and 49
33: <!-- Boolean setting for determining whether to go file-by-file and version-by-version or to discover
34: the revisions from the check-in history based on the dates, authors and comments as a key.
35: -->
36: <add key="DiscoverRevisions" value="True" />
37:
38: <!--
39: The window of time (in seconds) for multiple check-ins that may be considered a single revision
40: The key for the merge / revision is the "time,author,comment." Once all keys have been identified
41: the merge will move all files from a later revision into an earlier revision thereby
42: changing the time to the earlier revision. This happens iteratively.
43:
44: Ignored if DiscoverRevisions is false
45:
46: Additional notes:
47: End of lines and tabs are removed from comments and they are trimmed to determine the keys for merging / revisions
48: -->
49: <add key="MergeRevisionWindow" value="120" />
You will probably want to leave DiscoverRevisions = True. The MergeRevisionWindow is the time range that the VSS Commits will be grouped together to form 1 SVN commit. I have found 120 seconds to be a good number.
Line 31: Show What Will Be Imported? Or Actually Perform The Import?
27: <!-- Boolean setting for determining whether or not to actually perform the import
28: When set to false, the program will only show what files and/or revisions will be generated
29: When set to true, the program will perform the migration
30: -->
31: <add key="PerformImport" value="False" />
When set to False, a xml file will be created to show you what files will be imported. This is especially useful if you set DiscoverRevisions = True. This way you can verify what files will be imported with each commit.
Now to put it all together. After you’ve edited your App.Config and/or VssMigrate.exe.config you are ready to do either a test migration or the actual thing. If you set PerformImport=False in the config, you will get
the revisions_merged.xml will look similar to (this is a sample import I did):
notice how the commits are grouped by time… very nice.
1: <revisions count="42">
2: <revision time="10/18/2006 4:51:46 PM" author="Kadena" comment="">
3: <file name="$/ProdReporting/BoxLabel1.Dsr" version="1" />
4: <file name="$/ProdReporting/BoxLabel1.dsx" version="1" />
5: <file name="$/ProdReporting/BoxLabel2.Dsr" version="1" />
6: <file name="$/ProdReporting/BoxLabel2.dsx" version="1" />
7: <file name="$/ProdReporting/BoxLabel4.Dsr" version="1" />
8: <file name="$/ProdReporting/BoxLabel4.dsx" version="1" />
9: <file name="$/ProdReporting/ProdReporting.vbp" version="1" />
10: <file name="$/ProdReporting/clsMastRec.cls" version="1" />
11: <file name="$/ProdReporting/frmAbout.frm" version="1" />
12: <file name="$/ProdReporting/frmAbout.frx" version="1" />
13: <file name="$/ProdReporting/frmAdminMain.frm" version="1" />
14: <file name="$/ProdReporting/frmAdminPWord.frm" version="1" />
15: <file name="$/ProdReporting/frmDelBox.frm" version="1" />
16: <file name="$/ProdReporting/frmDetail.frm" version="1" />
17: <file name="$/ProdReporting/frmDetail.frx" version="1" />
18: <file name="$/ProdReporting/frmDspPartials.frm" version="1" />
19: <file name="$/ProdReporting/frmDspPartials.frx" version="1" />
20: <file name="$/ProdReporting/frmHistory.frm" version="1" />
21: <file name="$/ProdReporting/frmHistory.frx" version="1" />
22: <file name="$/ProdReporting/frmMain.frm" version="1" />
23: <file name="$/ProdReporting/frmMain.frx" version="1" />
24: <file name="$/ProdReporting/frmMDI.frm" version="1" />Ex
25: <file name="$/ProdReporting/frmMDI.frx" version="1" />
26: <file name="$/ProdReporting/frmPartial.frm" version="1" />
27: <file name="$/ProdReporting/frmPartial.frx" version="1" />
28: <file name="$/ProdReporting/frmPrint.frm" version="1" />
29: <file name="$/ProdReporting/frmPrint.frx" version="1" />
30: <file name="$/ProdReporting/frmSetInuse.frm" version="1" />
31: <file name="$/ProdReporting/frmUpdateMsg.frm" version="1" />
32: <file name="$/ProdReporting/frmUpdateMsg.frx" version="1" />
33: <file name="$/ProdReporting/modUpdateDatabase.bas" version="1" />
34: <file name="$/ProdReporting/Partial.Dsr" version="1" />
35: <file name="$/ProdReporting/Partial.dsx" version="1" />
36: <file name="$/ProdReporting/resmod.bas" version="1" />
37: </revision>
38: <revision time="12/14/2006 10:36:22 AM" author="Kadena" comment="">
39: <file name="$/ProdReporting/frmHistory.frm" version="2" />
40: </revision>
41: <revision time="12/14/2006 1:05:08 PM" author="Kadena" comment="">
42: <file name="$/ProdReporting/frmHistory.frm" version="3" />
43: </revision>
44: <revision time="12/14/2006 3:43:20 PM" author="Kadena" comment="">
45: <file name="$/ProdReporting/frmHistory.frm" version="4" />
46: </revision>
47: <revision time="12/15/2006 10:06:00 AM" author="Kadena" comment="">
48: <file name="$/ProdReporting/frmHistory.frm" version="5" />
49: </revision>
50: <revision time="12/15/2006 10:11:16 AM" author="Kadena" comment="">
51: <file name="$/ProdReporting/frmHistory.frm" version="6" />
52: </revision>
53: <revision time="12/18/2006 9:39:32 AM" author="Kadena" comment="">
54: <file name="$/ProdReporting/frmHistory.frm" version="7" />
55: <file name="$/ProdReporting/frmMDI.frm" version="2" />
56: </revision>
57: <revision time="12/18/2006 10:40:04 AM" author="Kadena" comment="">
58: <file name="$/ProdReporting/frmHistory.frm" version="8" />
59: </revision>
60: <revision time="12/18/2006 10:49:48 AM" author="Kadena" comment="">
61: <file name="$/ProdReporting/frmHistory.frm" version="9" />
62: </revision>
63: <revision time="12/18/2006 10:52:30 AM" author="Kadena" comment="">
64: <file name="$/ProdReporting/frmHistory.frm" version="10" />
65: </revision>
66: <revision time="12/18/2006 10:54:22 AM" author="Kadena" comment="">
67: <file name="$/ProdReporting/frmHistory.frm" version="11" />
68: </revision>
69: <revision time="12/18/2006 11:45:46 AM" author="Kadena" comment="">
70: <file name="$/ProdReporting/frmHistory.frm" version="12" />
71: </revision>
72: <revision time="12/19/2006 9:17:36 AM" author="Kadena" comment="">
73: <file name="$/ProdReporting/frmHistory.frm" version="13" />
74: </revision>
75: <revision time="12/19/2006 9:40:28 AM" author="Kadena" comment="">
76: <file name="$/ProdReporting/frmHistory.frm" version="14" />
77: <file name="$/ProdReporting/frmMDI.frm" version="3" />
78: </revision>
79: <revision time="12/19/2006 9:56:46 AM" author="Kadena" comment="">
80: <file name="$/ProdReporting/frmHistory.frm" version="15" />
81: <file name="$/ProdReporting/frmMDI.frm" version="4" />
82: </revision>
83: <revision time="12/19/2006 10:03:42 AM" author="Kadena" comment="">
84: <file name="$/ProdReporting/frmHistory.frm" version="16" />
85: <file name="$/ProdReporting/frmMDI.frm" version="5" />
86: </revision>
87: <revision time="12/19/2006 10:05:48 AM" author="Kadena" comment="">
88: <file name="$/ProdReporting/frmHistory.frm" version="17" />
89: <file name="$/ProdReporting/frmMDI.frm" version="6" />
90: </revision>
91: <revision time="12/19/2006 10:37:26 AM" author="Kadena" comment="">
92: <file name="$/ProdReporting/frmHistory.frm" version="18" />
93: </revision>
94: <revision time="12/19/2006 10:40:46 AM" author="Kadena" comment="">
95: <file name="$/ProdReporting/frmHistory.frm" version="19" />
96: </revision>
97: <revision time="12/19/2006 12:54:58 PM" author="Kadena" comment="">
98: <file name="$/ProdReporting/frmHistory.frm" version="20" />
99: <file name="$/ProdReporting/frmMDI.frm" version="7" />
100: </revision>
101: <revision time="12/19/2006 1:07:04 PM" author="Kadena" comment="">
102: <file name="$/ProdReporting/frmHistory.frm" version="21" />
103: </revision>
104: <revision time="12/19/2006 3:32:44 PM" author="Kadena" comment="">
105: <file name="$/ProdReporting/frmDetail.frm" version="2" />
106: </revision>
107: <revision time="12/20/2006 3:26:42 PM" author="Kadena" comment="">
108: <file name="$/ProdReporting/frmDetail.frm" version="3" />
109: </revision>
110: <revision time="12/26/2006 2:25:14 PM" author="Kadena" comment="">
111: <file name="$/ProdReporting/frmHistory.frm" version="22" />
112: <file name="$/ProdReporting/frmMDI.frm" version="8" />
113: <file name="$/ProdReporting/modUpdateDatabase.bas" version="2" />
114: </revision>
115: <revision time="1/11/2007 7:55:16 AM" author="Kadena" comment="">
116: <file name="$/ProdReporting/frmAbout.frm" version="2" />
117: </revision>
118: <revision time="1/12/2007 9:19:36 AM" author="Kadena" comment="">
119: <file name="$/ProdReporting/frmMDI.frm" version="9" />
120: </revision>
121: <revision time="1/12/2007 11:33:00 AM" author="Kadena" comment="">
122: <file name="$/ProdReporting/modUpdateDatabase.bas" version="3" />
123: </revision>
124: <revision time="1/29/2007 1:51:22 PM" author="Kadena" comment="">
125: <file name="$/ProdReporting/frmHistory.frm" version="23" />
126: <file name="$/ProdReporting/frmMDI.frm" version="10" />
127: </revision>
128: <revision time="1/29/2007 2:01:18 PM" author="Kadena" comment="">
129: <file name="$/ProdReporting/frmDetail.frm" version="4" />
130: </revision>
131: <revision time="8/25/2008 2:04:24 PM" author="Nkelley" comment="">
132: <file name="$/ProdReporting/BoxLabel1.Dsr" version="2" />
133: <file name="$/ProdReporting/BoxLabel1.dsx" version="2" />
134: <file name="$/ProdReporting/BoxLabel2.Dsr" version="2" />
135: <file name="$/ProdReporting/BoxLabel2.dsx" version="2" />
136: <file name="$/ProdReporting/BoxLabel4.Dsr" version="2" />
137: <file name="$/ProdReporting/BoxLabel4.dsx" version="2" />
138: <file name="$/ProdReporting/ProdReporting.vbp" version="2" />
139: </revision>
140: <revision time="1/5/2009 3:54:48 PM" author="Nkelley" comment="">
141: <file name="$/ProdReporting/BoxLabel3.Dsr" version="1" />
142: <file name="$/ProdReporting/BoxLabel3.dsx" version="1" />
143: <file name="$/ProdReporting/BoxLabel4.Dsr" version="3" />
144: <file name="$/ProdReporting/BoxLabel4.dsx" version="3" />
145: <file name="$/ProdReporting/ProdReporting.vbp" version="3" />
146: </revision>
147: <revision time="1/5/2009 4:43:00 PM" author="Nkelley" comment="TZT Line Added">
148: <file name="$/ProdReporting/BoxLabel4.dsx" version="4" />
149: <file name="$/ProdReporting/frmDetail.frm" version="5" />
150: <file name="$/ProdReporting/frmMain.frm" version="2" />
151: <file name="$/ProdReporting/frmMDI.frm" version="11" />
152: <file name="$/ProdReporting/ProdReporting.vbp" version="4" />
153: </revision>
154: <revision time="1/6/2009 3:47:02 PM" author="Nkelley" comment="">
155: <file name="$/ProdReporting/frmMain.frm" version="3" />
156: <file name="$/ProdReporting/modUpdateDatabase.bas" version="4" />
157: </revision>
158: <revision time="1/6/2009 3:50:40 PM" author="Nkelley" comment="">
159: <file name="$/ProdReporting/BoxLabel4.Dsr" version="4" />
160: <file name="$/ProdReporting/BoxLabel4.dsx" version="5" />
161: <file name="$/ProdReporting/frmDetail.frm" version="6" />
162: <file name="$/ProdReporting/frmMain.frm" version="4" />
163: <file name="$/ProdReporting/frmMDI.frm" version="12" />
164: <file name="$/ProdReporting/ProdReporting.vbp" version="5" />
165: </revision>
166: <revision time="4/16/2009 11:56:16 AM" author="Nkelley" comment="Fixed boxlabel4 table issue">
167: <file name="$/ProdReporting/BoxLabel4.Dsr" version="5" />
168: <file name="$/ProdReporting/BoxLabel4.dsx" version="6" />
169: <file name="$/ProdReporting/ProdReporting.vbp" version="6" />
170: </revision>
171: <revision time="4/16/2009 12:03:30 PM" author="Nkelley" comment="">
172: <file name="$/ProdReporting/ProdReporting.vbp" version="7" />
173: </revision>
174: <revision time="4/23/2009 11:04:50 AM" author="Nkelley" comment="Fixed problem where line 4 box labels would only print what was in the line 3 mysql table">
175: <file name="$/ProdReporting/frmMDI.frm" version="13" />
176: <file name="$/ProdReporting/ProdReporting.vbp" version="8" />
177: </revision>
178: <revision time="5/4/2009 10:07:06 AM" author="Nkelley" comment="Added Control-N for Auto Add New Serial Number">
179: <file name="$/ProdReporting/frmDetail.frm" version="7" />
180: <file name="$/ProdReporting/frmMDI.frm" version="14" />
181: </revision>
182: <revision time="5/4/2009 10:10:04 AM" author="Nkelley" comment="">
183: <file name="$/ProdReporting/ProdReporting.vbp" version="9" />
184: </revision>
185: <revision time="5/21/2009 2:40:32 PM" author="Nkelley" comment="">
186: <file name="$/ProdReporting/clsLine.cls" version="1" />
187: <file name="$/ProdReporting/clsLineSettings.cls" version="1" />
188: </revision>
189: <revision time="5/21/2009 4:50:42 PM" author="Nkelley" comment="">
190: <file name="$/ProdReporting/Globals.bas" version="1" />
191: </revision>
192: <revision time="5/21/2009 5:14:38 PM" author="Nkelley" comment="Refactored Code and added functionality to print to either a regular printer or a label printer">
193: <file name="$/ProdReporting/clsLine.cls" version="2" />
194: <file name="$/ProdReporting/clsLineSettings.cls" version="2" />
195: <file name="$/ProdReporting/frmDetail.frm" version="8" />
196: <file name="$/ProdReporting/frmMain.frm" version="5" />
197: <file name="$/ProdReporting/frmMDI.frm" version="15" />
198: <file name="$/ProdReporting/modUpdateDatabase.bas" version="5" />
199: <file name="$/ProdReporting/ProdReporting.vbp" version="10" />
200: </revision>
201: </revisions>
See Step 3… set PerformImport = True
Since I Use TortoiseSVN I checked out the project into a folder and then viewed the log:
Notice how Rev 43 Includes 7 Modified files… Woot!
VSS does not do this… the latest version of VssMigrate is what causes the Subversion Repository to include the *real* VSS Commit… Thank you guys!






More Options ...
Categories
Tag Cloud
Blog RSS
Comments RSS

Void « Default
Life
Earth
Wind
Water
Fire
Light 
Thanks for the post and quickstart guide, Nathan! I’ve taken the liberty of adding a link to this post on the VssMigrate project wiki. OSS FTW!
Awesome, I’ll keep it updated as the project evolves. And clear it up some too probably.
When I try to start VssMigrate I got the following error:
##### Building file list
System.InvalidCastException: Das COM-Objekt des Typs “SourceSafeTypeLib.VSSDatabaseClass” kann nicht in den Schnittstellentyp “SourceSafeTypeLib.IVSSDatabase” umgewandelt werden. Dieser Vorgang konnte nicht durchgeführt werden, da der Query
Interface-Aufruf an die COM-Komponente für die Schnittstelle mit der IID “{2A0DE0EE-2E9F-11D0-9236-00AA00A1EB95}” aufgrund des folgenden Fehlers nicht durchgeführt werden konnte: Schnittstelle nicht unterstützt (Ausnahme von HRESULT: 0×8000
4002 (E_NOINTERFACE)).
bei SourceSafeTypeLib.VSSDatabaseClass.Open(String SrcSafeIni, String Username, String Password)
bei VssMigrate.Program.BuildFileList() in D:\projects\VssMigrate-0.1.0.0\src\Program.cs:Zeile 100.
bei VssMigrate.Program.Main(String[] argv) in D:\projects\VssMigrate-0.1.0.0\src\Program.cs:Zeile 56.
I’ve tried with Visual SourceSafe Version 6c (Build 9238) and Version 6d.
Any help would be most welcome.
Many thanks in advance!
Regards
Michael
The Microsoft.VisualStudio.SourceSafe.Interop.dll is expecting Visual SourceSafe 2005. I didn’t realize this may be a prerequisite for this migration. I’m not 100% sure without getting my hands on a copy of an earlier version of VSS and looking for a workaround though.
Try removing the reference to Microsoft.VisualStudio.SourceSafe.Interop.dll and replace it with a reference to your ssapi.dll file from the VSS install directory and see if that fixes anything. This is really a guess though until I can recreate the issue.
I wish VSSMigrate worked for me. I ended up with an SubversionIOException, for a MKCOL-command against the Apache-controlled Subversion server – and I could not figure out how to get rid of it.
Instead I resorted to http://www.pumacode.org/projects/vss2svn, the Perl script probably being the “grand-father” of VSSMigrate… It worked like a charm
Removing the reference to SourceSafeTypeLib and adding a reference to ssapi.dll(it includes its own version of SourceSafeTypeLib) works.
Will need a a couple of changes to the code to make it compile. Some api is redundant in the ssapi.dll.
The commented lines didn’t compile, so i replaced it with my changes, what I thought would best fit.
//var commitArgs = new SvnCommitArgs {LogMessage = versionItem.VSSVersion.Comment};
var commitArgs = new SvnCommitArgs { LogMessage = vssVersion.Comment };
//fs.WriteLine(string.Format(“\t”, file.Spec, file.get_Versions(0).Count));
fs.WriteLine(string.Format(“\t”, file.Spec, 9999));
I replaced the count with 9999, didn’t know what the equivalent would have been.
I have started the migration, seems to work. Fingers crossed, hopefully the result will accurate (after my changes
)
Very useful web site. Truly grateful.
I got an error: “SharpSvn.SvnFileSystemException: Expected FS format between ‘1′ and ‘3′; found format ‘4′.” I replaced the SharpSvn bundled with VssMigrate with the latest 1.6 version and it worked.
Before I go through all the effort of attempting this.
Can I ask the question : Is it compatible with Visual Source Safe 6.0d?
– Lee
Convertings works so far but I get a couple aof these Warnings:
WARN Invalid svn status detected for $/MyFolder/MyFolder/MyFile.sln:2
Waht does this mean?
Very handy thank you. I thought we were going to have to lose our VSS revisions in the transition to SVN – very pleased we could preserve them.