BC3 as an external diff app for Subversion

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • antik
    New User
    • Nov 2008
    • 2

    BC3 as an external diff app for Subversion

    I'm excited to see that BC is now available for Linux! Many thanks to John (aka Ender) for the Gentoo eBuild!

    I wanted to use BC3 as an external diff tool for SVN. I tried BC's Subversion integration instructions but they're clearly aimed at Windows and porting the recommended script didn't work as well as I'd like for what I use BC for.

    I spent a few minutes fiddling and found a hack to do what I want BC to do in Linux: when I type 'svn diff' BC spawns with each comparison in its own tab.

    To do this, I wrote the following script and put it in /usr/bin/bcompare_svn:
    Code:
    #!/bin/bash
    
    /usr/bin/bcompare $6 $7 &
    
    exit 0
    The invocation of bcompare is obvious but I had to add "exit 0" so that svn would open more than one file at a time.

    To make svn invoke my script, I added the following line in the [helpers] section in ~/.subversion/config
    Code:
    diff-cmd=/usr/bin/bcompare_svn
    Just thought I post it up in case anyone else might find it useful!
  • Zoë
    Team Scooter
    • Oct 2007
    • 2666

    #2
    Hi antik,

    Thanks for the information. Are you sure about running BC in the background though? At least one Windows that doesn't work because various version control systems create temp files and delete them when the process ends, so if BC isn't blocking it can delete the files before the original window has a chance to load the comparison.
    Zoë P Scooter Software

    Comment

    • aceinnovations
      Visitor
      • Jul 2009
      • 5

      #3
      Not sure about the blocking, but might as well complete the script with titles:

      Code:
      #!/bin/bash
      
      bcompare "$6" "$7" -title1="$3" -title2="$5"
      
      exit 0

      Comment

      • AxMstrLp
        New User
        • Sep 2010
        • 1

        #4
        Whole change-set in the bcompare browser?

        Rather than popping up <n> different windows for every file changed, has anyone come up with a way to view a whole change-set in the bcompare file browser?

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 16026

          #5
          Hello,

          I am not familiar with an automated way to do this, but you could checkout a specific version of the repository to a Temp Diff folder, and then run a Folder Comparison comparing that folder to your folder. Running a Rules-based comparison would show any changed files, and they could be double-clicked to see more detail.
          Aaron P Scooter Software

          Comment

          Working...