Sourcesafe command line options

假如想象 提交于 2019-12-03 13:38:32

I think Lieven's answer may be a winner for you, but if it isn't you can try piping an 'N' to the command to answer the prompt for you:

@echo n | "c:\Program Files\Microsoft Visual SourceSafe\ss.exe" GET 
    "$/Development Projects/Activity" -GL"C:\Compile\Activity" -R -Q 
    -Yname,password

-I-Y Answers Yes to all Yes or No questions

http://msdn.microsoft.com/en-us/library/028cya07%28v=vs.80%29.aspx

Scott,

this is how we do a get latestversion for our daily builds.

SET SSDIR="c:\Program Files\Microsoft Visual SourceSafe"
SET SSUSER=Name
SET SSPWD=Password

CD C:\Compile\Activity
SS CP "$/Development Projects/Activity"
SS Get *.* -I -Y -R -W

I'm not entirely sure the Get *.* works. I seem to remember having troubles with that. Our actual script does a get for each file extension we need as in

Get *.pas -I -Y -R -W
Get *.dfm -I -Y -R -W

EDIT: brainstorming over it further, I'd try

SS Get * -I -Y -R-W

Following will answer No to all prompts

-I-N

I encountered this in the past (feel like a previous life to be honest), and couldn't get by it either.

What I ended up doing was writing some jscript to create the VSS Automation object, explicitly open the correct database and perform the various operations necssary, calling the script with cscript from the command line.

I seem to remember having different scripts for CheckOuts, CheckIns and Gets, though that was probably overkill.

Sorry I can't be of anymore help, if I had the code handy I'd post it here.

SourceSafe working folders are kept in the ss.ini text file located under the users subfolder of your SSDIR. You'll get prompted everytime you move to a new PC or login to SS as a new user to checkout files. To suppress this you should use the SS Workfold project folder command to explicity set your Working folder or prepopulate the ss.ini file with your Working folder preferences.

Adam Gojdas

You might try the following. Used with the -GF option to enable it to pick up the commandline variable change. Maybe it will work with -GF. Not certain though.

SET Force_Dir=YES

"c:\Program Files\Microsoft Visual SourceSafe\ss.exe" GET 
    "$/Development Projects/Activity" -GF -GL"C:\Compile\Activity" -R -Q 
    -Yname,password
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!