Use VSS in the command line

xiaoxiao2021-03-06  66

Author: David Eulerdate: 2004/11 / 26email: DE_EULER-David@yahoo.com If you have any questions, please contact me :) Recently, you need to put three or four hundred DLL files into the VSS database, and one by one. Play the version number of the LABE number, Label (just selected, click the version number in the mouse mail, the version number you can see), the initial calculation, so hundreds of files, a check out / check in, find Label, hit the label number, less talking about a day or two, so it is too slow. In the afternoon, I hope to operate the VSS database by programming in the DOTNET, so I don't see the relevant information, I see that VSS has command lines can be used. So I have searched online, I didn't see a few articles introduced by the VSS command line, or see the help documentation, I saw an afternoon, one night. Based on the use of C # or C / C , automatic Check Out / Check IN can be achieved, and the Label number will be automatically hit. Simply summed up, below is some common commands and operations of VSS:

1.Setup Environment Variable: // Points to the path where SS.exe is

PATH =% path%; C: / Program Files / Microsoft Visual Studio / VSS / Win32

2. Point the directory set ssdir = // GQA-ERIC-LV / VSS /

Set ssdir = // Guruvss / ERP $ /

3. Log in to VSS:

SS cp -Yeric, Eric123 -I- -S // GQA-ERIC-LV / VSS

4. Get any file of either directory to this machine (the next example will be $ / asp.net / dataGridTest / INDEX.ASPX file get to D: / TMP directory)

SS get -Gld: / TMP $ / asp.net / datagridtest / index.aspx

(SS GET, -GLPATH COPIES A File to The Specified Folder, Not to The Current or Working Folder.)

5. Split screen Display all files and folders in the directory ASP.NET: subfiles):

SS DIR $ / asp.net -r | more (additional, there are two parameters of -i -v, unknown)

6.Set Current Project:

SS CP $ / SQL-Sample

7.vss command line is case sensitive; the command in the command line does not need a full name, like SQL, as long as it can be identified, if Dir is DIRECTORY;

(Comply with UNC Universal Naming Rules, Universal Naming Convention)

8. Some universal command line options:

Option

Description

-C

Notes for the specified item (which can be multiple items) (DIR exception)

-O

Redirect command

-V

Operation of a specified version -R

Perform a commnd recursively.

-S

Turn smartmode on or off for the commit.

-G

Change The Way The Get Command Works on Any File Retrieved to The Local Drive.

-W

Specify whether the copy of this unit is read only (using this parameter, representing Writable) -n

Switch between the two modes of the length file name - I-

Enter -y is not prompted in any environment

Specify user name and password -? The role of both parameters is the help of online

9. When there is a space in the command, the entire option is enclosed in a double quotation. For example, use SS CP "-Yeric LV", ERIC123 without SS CP -Y "Eric LV", ERIC123,

10. Start graphics interface: sSEXP -S // GQA-ERIC-LV / VSS

11.ss command, / represents the current directory of VSS, $ / represents the root directory, the common operation command is as follows:

SS add test.c "my long filename.h", add two files of Test.c and "My Long FileName.h to the current project;

SS add -r *, add all files and folders of the current directory (including subfolders, files) to the current project;

SS add -d- * .dll, add all DLL files of the current directory to the current project, but do not retain historical files on VSS (saving space);

SS Checkout Test.c Test.h Checkout Current Items SS Checkout $ / TestData / Test.c Checkout Specifies the files in the project SS Checkout -R $ / TESTDATA Cycle Check Project $ / TestData SS Comment Test.c - V5 Change Test.c version number 5 Reviews SS Comment Test.c Change Test.c's latest version of the Note SS Comment $ / TestData change item $ / testdata's Note SS CREATE $ / WORD VSS root directory, Create a project Word SS CREATE WORD VSS, create a project Word SS CP $ / Word Settings $ / Word for the Current Project SS CP .. Jump to the current project's parent project

SS DELETE $ / prj / test.c Delete file test.c (file deleted by the delete command can be replied with direct add command, such as add test.c) SS DELETE $ / PRJ delete items (can not have two files Being delete, because there is no truly deletion) SS -S DELETE *. * Remove all files, -s deletes this unit after deleting files on the VSS.

SS DESTROY $ / PRJ / TEST.C lasting delete file (unrecoverable) SS Destroy $ / PRJ lasting delete project

12. Other changes: Label, Merge, Move, Password, Purge, Recover, Rename, Rrouver, Workfold, Branch, etc., these commands change the contents or environment of the VSS database.

13. VSS command line Comparison / Find / Display, etc. Does not change the database and environment: Diff, Dir, Filety, Get, Help, History, Links, Paths, Project, Properties, Status, View, Whoami

14. Show the nearest Version, Label Information: SS Properties

15. Show checkout files: SS Status

转载请注明原文地址:https://www.9cbs.com/read-87516.html

New Post(0)