Monday, August 27, 2012

Meld wrapper script

A script to call meld with comparison of local and remote file:
  1. #!/bin/sh  
  2.   
  3. # if you simply want to see what command arguments are passed by subversion,  
  4. # simply uncomment following line, and comment rest of the script:  
  5. # echo "$@"  
  6.   
  7. # http://pida.co.uk/wiki/UsingExternalDiffTools  
  8.   
  9. # Configure your favorite diff program here.  
  10. DIFF="/usr/bin/meld"  
  11.   
  12. # Subversion provides the paths we need as the sixth and seventh  
  13. # parameters.  
  14. LEFT=${3} # 'MINE' - was 6  
  15. RIGHT=${2} # 'THEIRS' (online) - was 7  
  16.   
  17. # Call the diff command (change the following line to make sense for  
  18. # your merge program).  
  19. $DIFF $LEFT $RIGHT  
  20.   
  21. # Return an errorcode of 0 if no differences were detected, 1 if some were.  
  22. # Any other errorcode will be treated as fatal.  

No comments:

Post a Comment

Blogger Syntax Highliter