Microsoft Visual SourceSafe is often used as a version control system in projects, developed under Microsoft Windows. Besides implementation for MS Windows, there are also implementations for other operating systems — you can read about them on the Microsoft's site.
We can work with Visual SourceSafe from Emacs by using the source-safe.el package. It implements all necessary commands, that could be performed without switching out of Emacs.
Installation of package is very simple — you need to download it from author's page, unpack and put it to place, where Emacs could find it. To use it, add following commands to initialization file:
(setq ss-program "S:\\WinNT\\SS.exe" ss-project-dirs '(("^D:\\\\OCI\\\\" . "$/PurifyW/"))) (require 'source-safe)
First two lines specify place of Visual SourceSafe executable and paths to the projects directories. And third line loads the package.
Retrieving of data from repository could be performed by several functions. The ss-get
function retrieve latest version of current file from repository. If you'll run this
function from Dired, it updates all files in current directory and its sub-directories.
You can also use ss-checkout function to retrieve current file from repository. With
ss-lock function you can lock current file in repository, doesn't changing its content.
User can view list of changes with ss-diff function. To produce list of changes this
function uses command, specified by ss-diff-program variable. If this function gets
non-interactive-p parameter, then all changes are displayed in new buffer. But without
this parameter, work with changes is performed with Ediff. User can commit changes with
ss-checkin function.
To create a new branch user can use the ss-branch function. There is also opposite
function —
ss-unbranch, that could be used to delete concrete branch and drop all made
changes. If user wants to put changes from concrete branch to main development tree, he
can use ss-merge function, that performs three-way merge of changes from given branch.
The package defines several functions, that could be used to retrieve information about
files —
ss-history function displays change log for current file, ss-status function
displays information about status of current file in Visual SourceSafe's repository, and
ss-locate function shows location of current file in Visual SourceSafe's repository.
Other functions, defined by package are: ss-help function, that displays short list of
available functions and their descriptions, and ss-submit-bug-report function, that could
be used to send bug report to developers.
User can customize behaviour of package by defining number of variables. Most important among them are:
ss-programss-project-dirsThere are also other variables, that could be customized by user:
ss-usernamess-passwordss-database-alistss-update-email-to, ss-update-email-subject and ss-update-email-bodyss-multiple-checkouts-enabledss-confirm-updatesUPDATE command,
or no.There is also two hooks —
ss-before-update-hooks and ss-after-update-hooks, that always
will called before and after UPDATE command.
Last change: 05.03.2013 16:54