Visual Source Safe Command Line

Hi!

What can be the advantages we can get by using the Visual Source Safe
Command Line




Answer this question

Visual Source Safe Command Line

  • Simon Hogg

    Hi Ali,

    Assuming you have a folder $/A and a folder $/B that’s a branch of $/A, you can merge all the files from $/B into $/A by using < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

                ss.exe cp $/A

                ss.exe merge –C $/B/*.*

     

    The merge command doesn’t work recursively (doesn't accept a -R flag), but you can write a batch file that lists the directories recursively and calls merge one directory at a time. For instance you can list recursively all directories under $/B with a command like

    for /F "delims=:" %I in ('ss dir $/B -R -F- ^| findstr /c:":"') do @echo %I


    You can combine them like

    for /F "delims=:" %I in ('ss dir $/B -R -F- ^| findstr /c:":"') do (
                       ss.exe cp %I:$/B=$/A%
                       ss.exe merge –C %I/*.*

    )


    I hope this helps,
    Alin


  • mike82y

    Hi Ali,

    I guess it's just a matter of user's choice. Personally, I prefer to do recursive get_on_label or get_on_date/time using command line tools; this is also a task that's done usually on build_machines. UI can also be used, and this is why I've put this as a separate 2nd point.

    And I've just remembered another operation that can be done easier from command line, at least for now: recursively merge branches, with all files in a folder. The UI only allows merging branches file-by-file; it is possible to combine this with ProjectDifferences to identify first which are the different files, and then merge them one-by-one, but it requires more user interaction to do it like this. Using command line is an easier alternative.

    Thanks,
    Alin

  • Satyendra Gupta

    hi!

    Sir Again thanks .. for giving me such a nice information about command line.

    u mentioned in the 2nd point that,
    operations like getting recursively the content of a folder on a specific version ()
    e.g. a label or a date/time) can be done more naturally via command line

    Sir GUI interface of a VSS gives these options
    Aren't those options are easiy to use then command line



  • vishal singh

    Hi Alin,

    Thanks for helping me again.
    u mentioned there, from a command line u can recursively merge branches, with all
    files in a folder,

    Can u plz give me example regarding to this

  • P J Walklate

    In any automated build environement with multiple code trees, the command line is much more simple and reliable when trying to create a specific version of the code set. Although the GUI is fine, the automation interface does not provide a simple method to get the "latest" version of a file that is PINNED to a prior version. Automated creation of command lines is also easy due to the simple syntax, and by logging them to a file, one can always see what was attempted, and repeat or test a single step by simply cutting the line from the file. JMHO
  • dncjp

    Hi Ali,

    to name just a few advantages:
    - you can use VSS command line in batch scripts, especially if you have a dedicated build-machine/automated build-system.
    - operations like getting recursively the content of a folder on a specific version ()e.g. a label or a date/time) can be done more naturally (I think) via command line
    - some operations can be done only through command line (e.g. recursive purging of deleted files)
    - some aditional information can be obtained about files (e.g. ss physical, shows which file in database correspond to which real file like LDBEAAAA on the disk)

    Alin

  • Visual Source Safe Command Line