I was unsuccessful using vss2svn.py, and due to time constraints and my
unfamiliarity with Python, wrote one in perl.
You can find it here: http://www.riseup.com/~brettw/dev/VSS2Subversion.html
Nathan Kidd wrote:
> While we're on the topic, I just tried using vss2svn last night and
> made a small patch to the argument checking and error reporting.
> (I've never used python before so maybe I missed something, but it
> seems at least on Python 2.3 for Windows the %s in the 'print's
> doesn't work.)
>
> My attempt to run vss2svn died almost immediately, but I will try
> Roelof's patch first, before reporting the problem.
>
> -Nathan
>
> P.S. The patch is also against r29 pulled from
> https://chidb01.tallan.com/vss2svn
>
> Jens B. Jorgensen wrote:
>
>> Indeed you are correct, the current code does not handle
>> deleted/purged/destroyed projects. I'll take a look at your patch and
>> see if we can get this added.
>>
>> Roelof Blom wrote:
>>
>>> Hi Jens,
>>>
>>> Testing the latest version (r29) of vss2svn.py I discovered it does
>>> not seem to handle deleted, purged or destroyed projects. Below is
>>> the traceback information of vss2svn.py.
>>>
>>> ************ Version 121 *****************
>>> User: Admin Date: 16-01-04 Time: 13:04
>>> $CRXDQWHFA deleted
>>>
>>> Traceback (most recent call last):
>>> File "D:\downs\scm\subversion\vss2svn\vss2svn.py", line 747, in ?
>>> InfoCache = GetInfoCache(vss_base)
>>> File "D:\downs\scm\subversion\vss2svn\vss2svn.py", line 545, in
>>> GetInfoCache
>>> raise RuntimeError('action %s not handled' % action)
>>> RuntimeError: action deleted not handled
>>>
>>> Having never written any Python code I attempted to fix this
>>> problem. The attached patch is the result: it handles deleted,
>>> purged, destroyed or recovered projects. It works for me, but
>>> probably isn't the best way to do it in Python. Can you please
>>> review it?
>>>
>>> Regards,
>>> Roelof Blom.
>>>
>>> Jens B. Jorgensen wrote:
>>>
>>>> Ok, I've done some more work on this and seem to have advanced its
>>>> stability and functionality. It still does not handle the "store only
>>>> latest version" flag for those who need that. It also doesn't handle
>>>> Branch or Share operations. It does however handle
>>>> deleted/recovered/purged/destroyed files though. I made the handling
>>>> of environment variables and command-lines params (hopefully) a
>>>> little more robust. A major change I made was replacing the command
>>>> history parsing to use regexps which is a big improvement. Things
>>>> like spaces in filenames which were certain death before should work
>>>> now.
>>>>
>>>> It's still got a way to go but this is progress. If anyone would care
>>>> to grab the lastest version (see URL below) and give it a try please
>>>> go ahead. I'll hopefully have improvements soon.
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>>> For additional commands, e-mail: users-help@subversion.tigris.org
>>>
>>
>------------------------------------------------------------------------
>
>Index: vss2svn.py
>===================================================================
>--- vss2svn.py (revision 29)
>+++ vss2svn.py (working copy)
>@@ -692,6 +692,9 @@
> printhelp()
> sys.exit(1)
>
>+if not sspath[-1] == '\\' :
>+ sspath = sspath + "\\";
>+
> ss = sspath + "ss.exe"
>
> # We do some sanity checking to make sure the user has supplied all that we need (as near as we
>@@ -703,13 +706,13 @@
>
> vss_repos_ini = os.path.join(vss_repos, 'srcsafe.ini')
> if not os.path.exists(vss_repos_ini) :
>- print 'The file %s does not exist. Your VSS repository directory should contain the file srcsafe.ini'
>+ print 'The file ', vss_repos_ini, ' does not exist. Your VSS repository directory should contain the file srcsafe.ini'
> sys.exit(1)
>
> try :
> os.stat(ss)
> except :
>- print 'The path to the VSS command-line program is not valid (%s), you\'ll need to modify ss_path in this script'
>+ print 'The path to the VSS command-line program is not valid (', ss, ') you\'ll need to specify the proper path using the -ss option'
> sys.exit(1)
>
>
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Feb 18 21:38:40 2004