Ian -

I only have about 3 VSS installations, so maybe I can take a stab at least
at determining the proper VSS API calls (and test that it all works).  Then
perhaps I'll be able to come up with a patch (no promises tho, still have
much C# to learn).

Peter

-----Original Message-----
From: Ian MacLean [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 23:07
To: Eric Fetzer
Cc: Peter Lanoie; Nant Users
Subject: VSS tasks] vssget - version=


The vss tasks were originally contributed by  Jason Reimer and currently
don't have a maintainer assigned. I don't use sourcesafe at all
otherwise I'd take a stab a fixing it. Anyone who has knowledge of the
VSS api should feel free to take a look at this.

taking a quick look at BaseTask.cs it does this to attempt to get the
specified version:

              _item = _database.get_VSSItem(_path, false);
              _item = _item.get_Version(_version);

where _item is an instance of the IVSSItem and _version is the value
specified in the version attribute. I see that IVSSItem also has a
get_Versions method. It could be used to determine the valid version
values and see if they match up to labels or not.

If someone wants to do some testing against a sourcesafe installation to
work out the correct sequence of api calls to get a specified version or
label then I'll happily accept patches.

as for the label attribute - the get task does not look for one. NAnts
behaviour right now is to just ignore attributes that it doesn't know
about. I agree that it would be nice to emit warnings or errors about
non-existent attributes. I'll take a look at adding this soon.

Ian

> Well Peter, I don't know why I tried it, but I did:
>
> <project name="GetLatest">
>     <vssget
>         user="Efetzer"
>         localpath="D:\TestGetLatest\Development"
>         recursive="true"
>         replace="true"
>         writable="true"
>         dbpath="\\Server\Repository\srcsafe.ini
> <file://%5C%5CServer%5CRepository%5Csrcsafe.ini>"
>         path="$/Centre/Development"
>         label="Build 53"
>     />
> </project>
>
> It didn't complain, but it just got the latest as you reported.  I'm
> guessing it wouldn't whine about a date either...  Does anyone know if
> this feature works in Ant?
>
> Eric
>
> */Peter Lanoie <[EMAIL PROTECTED]>/* wrote:
>
>     Eric,
>
>     I have had similar problems with VSSGET.  I have been labeling my
>     projects when they get built with a build.revision number
>     (9999.9999).  Following that, I call VSSGET using that label.  I
>     have not had it break on that call like you are seeing ("Version
>     not found") however I have since attempted to get a past version
>     and it indeed does not retrieve the past version, only returns the
>     current.  I think there is a problem with the task or the VSS COM
>     DLL.  I tried using a text label and then it totally failed.  The
>     task docs state that it accepts a version number, date, or label
>     but I'm not exact sure how it would know the difference between a
>     version number and a label given that labels can be anything. If
>     you are unfortunate enough to have a label that matches a version
>     number, what happens?  Also, given that I got total failure on
>     text labels, I'm not sure how to fix! the problem.  Otherwise, I
>     have had good luck with the VSS tasks.
>
>     Peter
>
>
>     -----Original Message-----
>     *From:* [EMAIL PROTECTED]
>     [mailto:[EMAIL PROTECTED] Behalf Of *Eric
>     Fetzer
>     *Sent:* Wednesday, July 30, 2003 16:24
>     *To:* Nant Users
>     *Subject:* [Nant-users] vssget - version=
>
>     I'm trying to get vssget based on a label working.  It works well
>     for me without a label.  I'm using nantContrib from 6/3/2003.
>     Here's my .build file:
>
>     <project name="GetLatest">
>         <vssget
>             user="Efetzer"
>             localpath="D:\TestGetLatest\Development"
>             recursive="true"
>             replace="true"
>             writable="true"
>             dbpath="\\Server\Repository\srcsafe.ini
>     <file://Server/Repository/srcsafe.ini>"
>             path="$/Development"
>             version="Build 53"
>         />
>     </project>
>
>     NAnt is saying:
>
>      vssget failed
>     Version not found
>
>     This particular label was created at the same level as the path.
>     Does anyone know what I'm doing wrong?  Thanks - Eric
>
>     ----------------------------------------------------------------------
--
>     Do you Yahoo!?
>     SBC Yahoo! DSL
>
<http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/s
bc/>
>     - Now only $29.95 per month!
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> SBC Yahoo! DSL
>
<http://pa.yahoo.com/*http://rd.yahoo.com/evt=1207/*http://promo.yahoo.com/s
bc/>
> - Now only $29.95 per month!





-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to