CounterSoft.Gemini.SourceControl.VSS
Hi!
We are using the Gemini Add-In for Visual Source Safe as this is a very useful extension.
I modified it in some details, which I would like to share with you:
1. In CSourceSafe::AssociateFileWithIssues() I added the lines
if (sComment == NULL)
{
sComment = L"";
}
Reason: I found, that the (still sometimes used) Visual Studio 6 sometimes passes NULL instead of an empty string as comment
and this would lead to an error (i.e. Checkin/Checkout fokm Visual Studio 6 would fail, when the Add-In has been registered).
2.: In CSourceSafe::AssociateFileWithIssues() I added the lines
long lVersion;
WCHAR sVersion[11];
pIItem->getVersionNumber(&lVersion);
wsprintf(sVersion, L"%li", lVersion);
wstring sNameAndVersion(sName);
sNameAndVersion += ';';
sNameAndVersion += sVersion;
and I replaced the line
bool bRet=gi.AssociateFileWithIssues(sName,sPath,msINIFile,sComment);
by
bool bRet=gi.AssociateFileWithIssues(sNameAndVersion,sPath,m_sINIFile,sComment);
In this way, not only the file name (e.g. "foo.h") but also the version number will be added to the Gemini Issue (e.g. "foo.h;12").
3.: I modified "SourceSafe.h" in the way, that "AssociateFileWithIssues()" will
not be called for "AfterAdd", "BeforeCheckout", "BeforeCheckin" und "AfterRename"
but only for "AfterAdd" und "AfterCheckin".
"AfterCheckin" is better than "BeforeCheckin", as only then the NEW version number is provided.
Associating the file already at Checkout does IMHO not make much sense, as the Checkout can still be undone.
And I do not understand, why after a Rename the old file name will be associated with issue -999 ???
Greetings from (currently sunny) Austria, Georg
gce
· 1 |
|
Thursday, July 16, 2009, 9:46:10 AM |