Sourcesafe command line options

谁说胖子不能爱 提交于 2019-12-09 11:39:29

问题


I am having an issue with the Microsoft Visual Sourcesafe command line options that I'm hoping someone has run across and can assist me with.

I have the following line in a DOS batch file.

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

When this line is executed in the batch file the following prompt appears ...

Set C:\Compile\Activity as the default folder for project $/Development Projects/Activity?(Y/N)

I need to suppress this prompt in order to let the script run unattended. I thought the -Q option would allow silent running but it does not suppress this prompt.

I've searched and can't seem to find an option that will remove this prompt. I don't want to set the default folder for the project so I would like to default the answer to "N" if possible.


回答1:


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



回答2:


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

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




回答3:


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



回答4:


Following will answer No to all prompts

-I-N




回答5:


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.




回答6:


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.




回答7:


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


来源:https://stackoverflow.com/questions/638540/sourcesafe-command-line-options

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!