SourceCode control from VS2005

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
Xavier
Posts: 230
Joined: Tue Mar 01, 2005 5:06 am

SourceCode control from VS2005

Post by Xavier » Tue Sep 23, 2008 10:26 am

Hello,

here is a code snippet I use to check out a file from a VS2005 Addin. The problem is that no files are considered as under Source code control (bSCC is always false)
I use the Fortress Enhanced Client, is it why it fails ?
Is it expected to work ?
If not,is there a simple C++ way to check out a fortress file ?

Code: Select all

      CComPtr<SourceControl>  pSC;
      VARIANT_BOOL bSCC;
      if (SUCCEEDED (m_application->get_SourceControl (&pSC)))
             CHECKHR (hr = pSC->IsItemUnderSCC (CComBSTR (strFullName), &bSCC));
Thanks

Xavier
Best regards

Xavier

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: SourceCode control from VS2005

Post by ian_sg » Tue Sep 23, 2008 12:42 pm

It looks like you're trying to check a file out using the MSSCCI API. Then enhanced client doesn't use this API.

If you could clarify what you're trying to do, I might be able to provide more guidance.
Ian Olsen
SourceGear

Xavier
Posts: 230
Joined: Tue Mar 01, 2005 5:06 am

Re: SourceCode control from VS2005

Post by Xavier » Wed Sep 24, 2008 2:45 am

This is very simple :)

To ensure that we have correct versions of our applications, our addin checks out the .rc files of the projects, increment the build number each time a build is successful and in case of multiple projects ensure that they all have X.Y.n.m with X and Y the same for all projects.

This means, for example, that all projects of a solution are numbered 3.0.x.y with x, y being related to build number
That we never release a version having the same version than a former one (we often provide small patches so it's very useful for us).

I hope this is clear.

Last remark, the add in is developped in C++ and provices many other feature I would really be reluctant to use c# as it would take very long to adapt it

Thanks
Best regards

Xavier

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Re: SourceCode control from VS2005

Post by ian_sg » Wed Sep 24, 2008 2:06 pm

The enhanced Visual Studio client wasn't designed with extensibility in mind at that layer. We do, however, ship an extensibility API. It's a set of .NET libraries, so C++ isn't the easiest way to use it but it's certainly possible.

You can download the Fortress 1.1.3 client API and documentation here.
Ian Olsen
SourceGear

Post Reply