Calling BC4 from Cornerstone SVN

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mryan
    Expert
    • Apr 2012
    • 53

    Calling BC4 from Cornerstone SVN

    In Cornerstone, you can specify a custom external compare script.

    After installing the BC4 command line tools, I created an AppleScript wrapper for use by Cornerstone, but it may work with other tools as well.

    Here's the script code:
    Code:
    -- Cornerstone executes the script as:
    --	/path/to/tool <original> <modified>
    --
    on run argv
    	do shell script "/usr/local/bin/bcomp \"" & item 1 of argv & "\" \"" & item 2 of argv & "\""
    end run
  • Aaron
    Team Scooter
    • Oct 2007
    • 16026

    #2
    Thanks very much for sharing.
    Aaron P Scooter Software

    Comment

    • invalidptr
      New User
      • Mar 2015
      • 1

      #3
      Yes, thank you.

      But shouldn't you be calling with bcompare instead of bcomp?

      Comment

      • Chris
        Team Scooter
        • Oct 2007
        • 5538

        #4
        bcomp is correct when launching from a version control on Mac.

        bcompare launches a comparison and returns immediately. bcomp launches a comparison and waits to return until the comparison is closed. If you use bcompare, the version control system won't detect when the comparison is complete and it might clean up temp files prematurely.
        Chris K Scooter Software

        Comment

        • pcscote
          New User
          • Nov 2016
          • 1

          #5
          Calling BC4 from Cornerstone 3 SVN Client

          The above script did not worked for me, I had to modify it as follow for Cornerstone 3:
          Code:
          -- Cornerstone executes the script as:
          -- /path/to/tool <original> <modified>
          --
          on run argv
             do shell script "/usr/local/bin/bcomp \"" & item 1 of argv & "\" \"" & item 3 of argv & "\" | exit 0"
          end run

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16026

            #6
            Hello,

            BComp is expected the parameters for two files to diff when called as a diff tool, or 4 files if used as a mergetool. It looks like Cornerstone may have updated their item numbering? I found this official documentation:
            https://www.zennaware.com/cornerston...are-tools.html
            Aaron P Scooter Software

            Comment

            Working...