Vim logo vim online Vim Book Ad

SourceSafe Integration : Fairly complete file-based SourceSafe Integration

 script karma  Rating 22/11, Downloaded by 528

created by
Michael Geddes
 
script type
utility
 
description
This sourcesafe integration is based on some shell scripts that I've had
kicking round for ages to do the same thing.

It relies on a script variable or an environment variable $SS to be set to point to ss.exe, and on a '.project' file specifying which srcsafe database to use.

It has been improved by (at least) the contributions of these people:
     David Eggum (borrowed code)
     Vikas Agnihotri (fixes & suggestions)
     Zak Beck (fixes & suggestions)

The scripts will work if either your srcsafe.ini in the install directory
'includes' your main project, or you have SSDIR set to point to your
sourcsafe server project.

It works by scanning for a file  '.project' which should be in the root
directory of the project.
This file should contain the source-safe path
eg:
$/MyProj/
Version 1.6 has improved support for multiple databases.
A sourcesafe path (or inifile) can precede this, inclosed with '@' symbols :
eg:
@\\file\srcsafe@$/MyProj/


Note that in the following, you can specify a count for Get, Diff,  (checkout ??)
This does a get of/diff against the specified version.

The scripts do their best to allow the user to respond to prompts.  It does this by always answering 'no', then
parsing the response, and asking the user 'yes/no', and then re-executing the command always answering 'yes'.

Here are the commands availble: (replace \ with <localleader>)

Command       Map       Count      Description
--------------------------------------------------
SDiff               \sf         Version    Diff (Vim Diff)
SDiffClose       \sF                      Close Diff
SDiffSS           \sd       Version    Diff (text diff)
SCheckout      \sk       Version    Checkout
SLock             \s<c-k>Version    Checkout (No Get)
SUncheckout  \s<c-U>               Uncheckout
SGet              \sg       Version    Get
SMerge          \sG                     Merge get
SUpdate         \su                     Update (checkin)
SStatus          \ss                     Status
                      \sh       Count     History (last n / 3)
SHistory          \sH                   History window (vertical split - syntax highlighted)
SAdd               \sA                   Add file to sourcesafe
SRepeatUpdate \\u                   Update (same comment)
SUpdateLocked \sU                  Update and keep locked
SRepeatUpdateLocked \\U            Update (same comment) and keep locked.
SDeploy                            Deploy the specified directory

SPLocked[!]  [project [username]]
  View locked files for the given project (or the cwd) - ! specifies recursive.
  Username can be left blank (for current user) or specified as '*' for all
  users.
 
install details
Use as Plugin or source from _vimrc.
Don't forget to add a '.project' file containing the sourcesafe project you are working with in the physical directory where your project is.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
srcsafe.vim 1.14 01-Jan-2003 6.0 Michael Geddes - Fix up system call with $VIMRUNTIME containing spaces. -Zak Beck
- Make Get prompt to overwrite a read-only file.
- Remove calls to ShortName where possible. (VSS shortname is not
   always the same as M$oft shortname anyway!)
- Prevent Diff against project - causes wacky behaviour.
srcsafe.vim 1.13 03-Nov-2002 6.0 Michael Geddes Add interactive mode for answering multiple questions.
Fix up checking of modified status & automatic reloading of status's
srcsafe.vim 1.12 03-Nov-2002 6.0 Michael Geddes - Remove extra cr's when reporting sourcesafe results.
- Add '!' for Get to do a recursive get.
- Add VDiff to allow a Vertical diff using the smart-diff code
- Recognise URL's quickly to prevent loops- reported by Paul Bossi
- Recognise scratch buffers
- Allow quick status on directories.
srcsafe.vim 1.11 29-Sep-2002 6.0 Michael Geddes - Fix up commands on files in the root directory
- Made sure Status command doesn\\'t show extra messages while being
   created (Spotted by Z.B.)
Fixes from Zak B
- Added ssHistVertical option.
- Fixed menus for checkin similar
- Fix checking ssExecutable when using $SS
- Allow $SS to have spaces - make script to the hard work.
- Set/restore showcmd while doing SPLocked
- Fix up SPLocked for filenames with spaces.
srcsafe.vim 1.10 22-Sep-2002 6.0 Michael Geddes - Fixed a problem with 'Add' preventing it from working.
- Removed a few problem points where the project filename wasn't found.
- Fix check for ss.exe
- Add check for ss.exe in the common directory
srcsafe.vim 1.9 26-Aug-2002 6.0 Michael Geddes Various suggestions/fixes from Zak Beck:
     - Fixed Explore/Admin so they work
     - Add UpdateLocked and UpdateSimilarLocked
     - Added Deploy
     - Made non-error results use echo rather than confirm()
     - Added confirm-write for various commands.
     - Side-effect Text-Diff no longer appears in a dialog
srcsafe.vim 1.8 19-Aug-2002 6.0 Michael Geddes Fixed up some problems with paths with spaces.
srcsafe.vim 1.7 01-Aug-2002 6.0 Michael Geddes Added rudely missed acknowledgements of work I'd coppied.
Coppied & improved status line support from David Eggum
Menus now show the correct keystrokes.
srcsafe.vim 1.6 08-May-2002 6.0 Michael Geddes Really fixed multiple srcsafe projects this time.
Tidied up displaying of checked-out-files
Set folds to all open when restoring fold attributes from diff attributes and where fdc=0
srcsafe.vim 1.5 07-May-2002 6.0 Michael Geddes Improved multiple database support (use env variable $SSDIR)
Added viewing of 'checked out files' support.
Close diff / automatically restore pre-diff view when closing diff windows.
Only have one diff window open at a time
srcsafe.vim 1.4 05-May-2002 6.0 Michael Geddes Both these improvements were suggested by Scott G
* If the directory $TEMP/SS  (which is required by the script) does not exist, then create it / warn the user if $TEMP doesn't exist.
* Allow closing of the diff buffer, returning (as best as I can get) the screen to how it was before the diff.
  - Also closes the last srcsafe diff before opening the new one.
  - Clears 'diff' on all other windows, and tries (as best as it can) to restore the 'diff' when the srcsafe diff closes.
srcsafe.vim 1.3 02-May-2002 6.0 Michael Geddes Fixed up bug that prevented this from being used with 'type' rather than 'cat'.</td> </tr> <tr> <td class="rowodd" valign="top" nowrap><a href="script_download.php?src_id=689">srcsafe.vim</a></td> <td class="rowodd" valign="top" nowrap><b>1.2</b></td> <td class="rowodd" valign="top" nowrap><i>17-Mar-2002</i></td> <td class="rowodd" valign="top" nowrap>6.0</td> <td class="rowodd" valign="top"><i><a href="/profile.php?user_id=14">Michael Geddes</a></i></td> <td class="rowodd" valign="top" width="2000">Added support for multiple SourceSafe databases! (this was tricky) <br></td> </tr> <tr> <td class="roweven" valign="top" nowrap><a href="script_download.php?src_id=659">srcsafe.vim</a></td> <td class="roweven" valign="top" nowrap><b>1.1</b></td> <td class="roweven" valign="top" nowrap><i>07-Mar-2002</i></td> <td class="roweven" valign="top" nowrap>6.0</td> <td class="roweven" valign="top"><i><a href="/profile.php?user_id=14">Michael Geddes</a></i></td> <td class="roweven" valign="top" width="2000">Initial upload</td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <!-- END OF THE PAGE BODY: BETWEEN HEADER AND FOOTER --> <!-- INCLUDE THE PAGE FOOTER --> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr> <tr><td colspan="4" bgcolor="#000000"><img src="/images/spacer.gif" height="2" width="1" alt=""></td></tr> <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr> <tr> <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td> <td align="left" valign="top"><small> If you have questions or remarks about this site, visit the <a href="http://vimonline.sf.net">vimonline development</a> pages. Please use this site responsibly. <br> Questions about <a href="https://www.vim8.org/about.php">Vim</a> should go to [email protected] after searching <a href="http://groups.yahoo.com/group/vim">the archive</a>. Help Bram <a href="http://iccf-holland.org/">help Uganda</a>. </small> </td> <td align="right" valign="top"> <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge Logo"></a> </td> <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td> </tr> <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr> </table> </body> </html>