# ant-user mailing list archives

##### Site index · List index
Message view
Top
From "Liu, Kenneth Albert (Kenneth)** CTR **" <ken...@lucent.com>
Subject RE: pulling out the code from SourceSafe
Date Mon, 16 Apr 2001 20:37:23 GMT
Hi all -

Here's a slightly modified snippet of my build.xml that I use to pull down
code from sourcesafe  (I replaced
my app specific parameters) into the "src" dir in the current directory.
The VSS directory on the remote machine is shared (Windows file sharing).  I
don't think this relies on any environment variables to work.

I hope this clears up a lot of confusion for you guys.

Ken

<target name="refresh.source.files">
<property name="vss.dir" value="\\RemoteMachine\VSS\win32"/>
<property name="target.vss.project" value="/PROJECT/SUBPROJECT/src"/>
<echo message="getting latest code for ${target.vss.project} from source control..."/> <vssget localPath="src" autoresponse="y" recursive="true" login="build" vsspath="${target.vss.project}" writable="false" ssdir="${vss.dir}"/> </target> -----Original Message----- From: Dana Rice [mailto:Dana.Rice@exodus.net] Sent: Monday, April 16, 2001 4:00 PM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe Lance, thanks for the clarification. The problem I seem to be having is that I have two databases. One is an apparent default one which has the path of the ss executable on my machine. The other is the database I want which is on another machine. I can't get vssget to look at the remote machine, it only finds the default database. -----Original Message----- From: Peterson, Lance [mailto:lpeterson@verticore.com] Sent: Monday, April 16, 2001 1:57 PM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe Dana, there are actually two SSDIR variables: There is an environment variable that points to the directory with srcsafe.ini (e.g. "\\Ftcollins\FTCOLLINS_D\VSS\COMDev"), and there is VssGet attribute which is the path to the SourceSafe client program (e.g. "c:\program files\microsoft visual studio\common\vss"). They are NOT the same, but that's okay since task attributes in Ant do not collide with OS env variables. You just have to remember which is which. Ant itself does not actually rely on the SSDIR environment variable. SS.EXE uses the env variable to find the correct srcsafe.ini. The VssGet task, on the other hand, uses the ssdir attribute to find SS.EXE. BTW, you don't have to set the SSDIR environment variable in a batch file. You can set it permanently in the System control panel. This works great if you're only using one SourceSafe database (as I am). If you use more than one SS database, then you can use a batch file to set SSDIR to the appropriate database for each project. Best regards, Lance Peterson -----Original Message----- From: Dana Rice [ mailto:Dana.Rice@exodus.net <mailto:Dana.Rice@exodus.net> ] Sent: Monday, April 16, 2001 1:44 PM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe Shannon, still struggling with getting ant to look at correct database. When you set the env.bat with ssdir and then ssdir also is used as the path for the executable in vssget, how is this consistent/resolved? Is there away of echoing or finding out what ssdir is set to. Dana -----Original Message----- From: Shannon Wagner [ mailto:swagner@smartmoney.com <mailto:swagner@smartmoney.com> ] Sent: Friday, April 13, 2001 11:36 AM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe What's the error that you are getting? Have you tried also specifying the "login" attribute within the <vssget> call? I think you need it. Does the account under which Ant is running have sufficient rights to \\Ftcollins\FTCOLLINS_D\VSS\COMDev? -----Original Message----- From: Dana Rice [ mailto:Dana.Rice@exodus.net <mailto:Dana.Rice@exodus.net> ] Sent: Friday, April 13, 2001 1:27 PM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe Shannon, I appreciate the help. What I see in VSS explorer above the right pane is$/agent/dca3.2.
The env.bat looks like:
set ssdir=\\Ftcollins\FTCOLLINS_D\VSS\COMDev
And FTCOLLINS is one of my network places.

<target name="getcode">
<vssget localpath="C:/dca3.2test"
recursive="true"
vsspath="$/agent/dca3.2" writable="true" ssdir="C:/Program Files/Microsoft Visual Studio/Common/VSS/win32"/> <echo message="getcode"/> </target> -----Original Message----- From: Shannon Wagner [ mailto:swagner@smartmoney.com <mailto:swagner@smartmoney.com> ] Sent: Friday, April 13, 2001 11:18 AM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe Sorry - I don't know why executing ss.exe brings you into "help". Yes, we are running "setenv.bat" to set the ssdir variable before each build. As for the error you are getting... [vssget]$/path/to/project/in/vss is not an existing filename or project.

"$/path/to/project/in/vss" needs to be replaced by the VSS path to a project. For example, you might have a project in VSS like "$/Java/Applets/Calculator".  This is the complete path that you would see
above the right pane if you were browsing to the project using the VSS
explorer.

Why don't you reply with the exact code which you are using, so that I can
see it?

-----Original Message-----
From: Dana Rice [ mailto:Dana.Rice@exodus.net <mailto:Dana.Rice@exodus.net>
]
Sent: Friday, April 13, 2001 1:05 PM
To: 'ant-user@jakarta.apache.org'
Subject: RE: pulling out the code from SourceSafe

OK, I wasn't sure because when I execute ss.exe I get into "help". Do you
run you env.bat just before the ant build? I think this is still my problem.

I get this:
[vssget] $/path/to/project/in/vss is not an existing filename or project. Is \\SERVER\path\to\vss_database explicitly what is mapped onto your pc? -----Original Message----- From: Shannon Wagner [ mailto:swagner@smartmoney.com <mailto:swagner@smartmoney.com> ] Sent: Friday, April 13, 2001 10:48 AM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe It should be executing ss.exe, since this is the command line version of the application. ssexp.exe is just a GUI front-end. -----Original Message----- From: Dana Rice [ mailto:Dana.Rice@exodus.net <mailto:Dana.Rice@exodus.net> ] Sent: Friday, April 13, 2001 12:40 PM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe Thanks Shannon, I'm closer but still not there. Am I wrong in observing that vssget tries to execute ss.exe? Should it not be ssexp.exe? -----Original Message----- From: Shannon Wagner [ mailto:swagner@smartmoney.com <mailto:swagner@smartmoney.com> ] Sent: Friday, April 13, 2001 9:49 AM To: 'ant-user@jakarta.apache.org' Subject: RE: pulling out the code from SourceSafe Dana, We're using code similar to the following: ... rem setenv.bat - This part runs in a batch script. rem rem You seem to need to have this environment variable rem set in order for VSS to find the database. set ssdir=\\SERVER\path\to\vss_database ... <!-- build.xml --> <!-- Note that VSS calls everything a project, not a folder. --> <vssget localpath="c:\path\to\local\vss\working\folder" login="vss_user,vss_password" vsspath="$/path/to/project/in/vss"
ssdir="c:\path\to\vss\executable"
recursive="true"/>

-----Original Message-----
From: Dana Rice [ mailto:Dana.Rice@exodus.net <mailto:Dana.Rice@exodus.net>
]
Sent: Friday, April 13, 2001 11:24 AM
To: 'ant-user@jakarta.apache.org'
Subject: RE: pulling out the code from SourceSafe

Thanks for the explanation. I'm having a problem with my vsspath. Part of
the problem is that VSS is on another computer on our network but I still
should be able to get to if I use the correct path statement. What is vssget

looking for? The notes make reference to a project, I usually just get the
latest version, do I have to create a project for vssget to work?
-----Original Message-----
From: Peterson, Lance [ mailto:lpeterson@verticore.com
<mailto:lpeterson@verticore.com> ]
Sent: Thursday, April 12, 2001 4:48 PM
To: 'ant-user@jakarta.apache.org'
Subject: RE: pulling out the code from SourceSafe

MSVSSGET is the name of the class that implements the vssget task.  (The
Defaults.properties (in src/org/apache/tools/ant/taskdefs) maps MSVSSGET to
vssget.
-----Original Message-----
From: Dana Rice [ mailto:Dana.Rice@exodus.net <mailto:Dana.Rice@exodus.net>
]
Sent: Thursday, April 12, 2001 4:41 PM
To: 'ant-user@jakarta.apache.org'
Subject: RE: pulling out the code from SourceSafe

why when you get a listing of the optional.jar there is no vssget but there
is a MSVSSGET?


Mime
View raw message