Perforce 3-way merge or bcomp.exe command line

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Adrian--1
    Journeyman
    • Feb 2009
    • 13

    Perforce 3-way merge or bcomp.exe command line

    Can invoke BC3 diff fine from Perforce but cannot see how to do a 3-way merge. The BC3 help page "Command line reference" only describes a "pair of files" as command line parameters. The support page (here http://www.scootersoftware.com/suppo...?zz=kb_vcs.php) says use P4V arguments of '%1 %2 %b %r /lefttitle="%T" /righttitle="%Y"' but this gives left and right filenames of \%T\ and \%Y\ (backslash, percent, T or Y, backslash). Omitting the two title options shows the file names but has some files in the wrong windows.

    Tried using the four /vcsleft/right/centre/output options as the only arguments, but that gives the home view, the same view as if BComp.exe is invoked without any arguments or options.

    What I would like to know is the format of the command line to invoke a 3-way merge. Perhaps also the help and support pages referenced above could be reviewed and some examples added.


    Also: Ran <<<"C:\Program Files\Beyond Compare 3\BComp.exe" /?>>> from a Windows XP Start...Run and the help viewer starts, it has the expected left hand side, but the right hand side says "The page cannot be displayed".




    Using Beyond Compare 3.0.15 (build 9758)
    Windows XP
    Firefox 3.0.6 as default browser.
    Have been using BC2 for some time and am checking out the trial BC3 before updating our licences.
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Adrian,

    The order of the command line arguments is:

    bcomp.exe <left file> <right file> <center file> <output file>

    What version of P4V are you using?
    Chris K Scooter Software

    Comment

    • Adrian--1
      Journeyman
      • Feb 2009
      • 13

      #3
      Thank you Chris.
      Had not found that about the four command line arguments in the help system, it only seems to describe a two argument call.
      I am using Perforce Visual Client/NTX86/2008.1/164135, 2008-September-08.

      Comment

      • Michael Bulgrien
        Carpal Tunnel
        • Oct 2007
        • 1772

        #4
        Originally posted by Adrian--1
        Thank you Chris.
        Had not found that about the four command line arguments in the help system, it only seems to describe a two argument call.
        I am using Perforce Visual Client/NTX86/2008.1/164135, 2008-September-08.
        Scooter: There are two related topics in the help system:
        - Calling BC from Other Applications
        - Command Line Reference

        Adrian is right about there being no examples of opening a 3-way merge in the help system. That should be added, or at the very least, provide a link to your online knowledgebase article: Using Beyond Compare with Version Control Systems
        BC v4.0.7 build 19761
        ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

        Comment

        • Michael Bulgrien
          Carpal Tunnel
          • Oct 2007
          • 1772

          #5
          Originally posted by Michael Bulgrien
          no examples of opening a 3-way merge in the help system.
          Well, I guess there is one ambiguous reference in the help system:

          /vcsleft=<path>
          /vcsright=<path>
          /vcscenter=<path>
          /vcsoutput=<path>

          Path within the version control system. Used to select appropriate file format. Shown in the respective path edit if a title isn't given.


          Perhaps this would be a good place for the link to the knowledgebase.
          BC v4.0.7 build 19761
          ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

          Comment

          • Chris
            Team Scooter
            • Oct 2007
            • 5538

            #6
            Michael,

            Thanks for the suggestions. We'll work on clearing this up in the help file.

            The /vcs switches are similar to the /title switches, but BC looks at the end to see what file format to use.

            As an example, launch a diff of a file in the left pane named "test.c". The version control system might check it out to a temp file name like "c:\temp\test1234.tmp".

            If you just gave BC the "c:\temp\test1234.tmp" path, it wouldn't know what file format to use. If you pass "c:\temp\test1234.tmp /vcsleft=test.c" to BC, it will open the temp file, but it will display "test.c" as the title and look at the .c file extension to use the correct C/C++ file format.
            Chris K Scooter Software

            Comment

            • Chris
              Team Scooter
              • Oct 2007
              • 5538

              #7
              Adrian,

              Try using "%1 %2 %b %r" as the command line arguments for Merge for P4V. I checked the help documentation for P4V 2008.1 and it doesn't mention %T and %Y as variables available when calling external merge tools.

              Please let me know if using the revised command line works for you.
              Chris K Scooter Software

              Comment

              • Adrian--1
                Journeyman
                • Feb 2009
                • 13

                #8
                Chris

                Thanks for the info. The "%1 %2 %b %r" command line argument in P4V appears to work fine.

                Also I noted you words about the /vcs switches being similar to /title ones. It would be good if you could clarify this point in the help files. The purpose of the /vcs switches was not at all clear to me. Plus there are two other help file issues I mentioned in my first post above.

                Adrian

                Comment

                • Chris
                  Team Scooter
                  • Oct 2007
                  • 5538

                  #9
                  Glad that helped. We'll clarify the descriptions for the /vcs switches and the order of arguments for merge in a future version of the help file.
                  Chris K Scooter Software

                  Comment

                  Working...