PythonWin VSS Integration

Mike C. Fletcher mfletch at vrtelecom.com
Tue Jun 29 18:30:39 CEST 1999


Spent the morning playing with this.  The mssccprj.scc file was not there,
adding it to the directory allowed errors to occur.  The errors were of the
type can't find this item.  After verifying that I was using the proper
format for project name, spent some time spelunking on MSDN to discover how
SourceSafe decides which database to load.  Since PythonWin does not check
for a non-default database, SourceSafe searches in this manner (quoted from
MSDN, copyright Microsoft):

1  Search for srcsafe.ini in the directory where ssapi.dll is located.

2  Search for srcsafe.ini in each directory of the path to ssapi.dll. In
other words, if ssapi.dll is located in
C:\Folder1\Folder2\Folder3\SSAPI.DLL, Folder3, Folder2, Folder1 and C:\ are
searched (in that order).

3  Search for srcsafe.ini in the location indicated by the named value "API
Current Database" in the registry key
HKEY_LOCAL_MACHINE\Software\Microsoft\SourceSafe.

4  Search for srcsafe.ini in the location indicated by the named value
"SCCProviderPath" in the registry key
HKEY_LOCAL_MACHINE\Software\Microsoft\SourceSafe.

I have as of yet been unable to get the SourceSafe Open automation command
to accept a non-default argument, so I cannot offer a patch to vss.py.  I've
worked around problem by renaming the default database's INI file, and
putting the path to my non-default database into the key mentioned in step
three above.  Everything now works as expected (that is, attempts to alter
the file prompt for check out and do perform check).

Okay, have spent far more time on this than I was looking to, enjoy
yourselves,
Mike

Mark Hammond <MHammond at skippinet.com.au> wrote in message
news:7la6vj$rh0$1 at m2.c2.telstra-mm.net.au...
> Mike C. Fletcher wrote in message <002a01bec203$1fc90230
> [Laments about Pythonwin and Source Safe]
>
> >So, any hints?  What does visual source safe integration mean?
>
> Well, it _should_ give you some clues.  Note that you need to restart
> Pythonwin before the option will take effect.  Also note that the file
must
> be marked read-only on the disk.
>
> Once enabled, and assuming VSS is installed correctly, the most likely
error
> message you will see is something like "this directory is not configured
for
> VSS".  [Once the option is checked, you should get _some_ message on a
> read-only file]
>
> In this case, you need a "mssccprj.scc" file either in the file's
directory
> or a parent directory.  This is the same name and format as VB uses -
> basically a Windows INI file.  A section [Python] with entry
> "Project=ProjectName" is referenced.  The project name is the name of the
> VSS project the Python code attempts to check the file out from.  If the
> .scc file is in a parent directory, the correct relative VSS path is
built -
> so if your file system matches your VSS structure, you only need a single
> .scc file in the VSS "root" directory.
>
> Hope this makes sense.
>
> Mark.
> >
> >Thanks,
> >Mike
> >
>
>
>






More information about the Python-list mailing list