Merge multiple files on a branch

I am merging a branch back onto my develoment tip.  I branched by using share and then breaking the share for files that needed to change independently.

I have about 123 files that have branched.  Is there some way in VS2005 to merge these other than one at a time

Also, is there some way to find which files are shared between two projects and which have had their shares broken   I did this with "ss links" and a batch file, but it was hideously slow.

Thanks.




Answer this question

Merge multiple files on a branch

  • nancyboy

    Hi Mark,

    You can merge multiple files using command line. The "ss.exe Merge" command in VSS2005 accepts a new parameter -R that allows you to recursively merge 2 folders contents.

    > which files are shared between two projects and which have had their shares broken

    If by "broken shares" you mean "branched", you should be able to use the "ss.exe Paths" command to list branched files.

    Alin


  • rsteckhan

    Hi Alin,

    I tried ss merge on a project, but it doesn't work for me. In the project I am looking at, I have five files: datastr.h, geometry.h, globals.h, ns.h, and nsdef.h. Only nsdef.h has branched. I do:

    ss merge $/xproj/ylib/inc.releases -L -R -B1

    and I get:

    datastr.h
    Files are not branched
    $/xproj/ylib/inc.releases/geometry.h is not branched in datastr.h
    $/xproj/ylib/inc.releases/globals.h is not branched in datastr.h
    $/xproj/ylib/inc.releases/ns.h is not branched in datastr.h
    $/xproj/ylib/inc.releases/nsdef.h is not branched in datastr.h

    What can it possibly mean that "nsdef.h is not branched in datastr.h"   This makes no sense to me at all.

    It does appear to work right if I do just the file that has branched:

    ss merge $/xproj/ylib/inc.releases/nsdef.h -L -R -B1

    But, this will be extremely tedious in the other project where I have 100 branched files.



  • ashish12345

    Hi Mark,

    Make sure you have VSS 2005, the -R switch was not present in VSS6.

    I don't know about the structure of your database, but here is how the command works:

    Assume you have some files in $/1 folder that were shared into $/2 folder and branched. Then, new versions of the files have been checked in into $/2 folder, and now you want to merge them into $/1. The following commands should do the trick:

           ss cp $/1

           ss merge -R -L $/2

    This works fine for me. I get "Files are not branched" for every file shared in both $/1 and $/2 projects but that is not branched, and all the files that were branched get merged and remain checked out.

    You can remove the -L argument if you want the files to be checked in automatically, and add instead -Cmergecomment

    Alin


  • Merge multiple files on a branch