Ignore:
Timestamp:
09/15/10 12:52:06 (15 years ago)
Author:
Mathieu Morlighem
Message:

new svnvimdiff that is now working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/scripts/svnvimdiff

    r1129 r5825  
    11#!/bin/bash
    2 #
    3 # Copyright (C) 2007,
    4 #   Geoff Buchan        <geoffrey.buchan@gmail.com>
    5 # Based on the script cvsvimdiff, written by
    6 #   Stefano Zacchiroli  <zack@cs.unibo.it>
    7 #   Enrico Tassi        <tassi@cs.unibo.it>
    8 #
    9 # This is free software, you can redistribute it and/or modify it under the
    10 # terms of the GNU General Public License version 2 as published by the Free
    11 # Software Foundation.
    12 #
    132
    14 mv $1 $1.yourfile
    15 svn update $1
    16 mv $1 $1.currentsvnfile
    17 vimdiff $1.currentsvnfile $1.yourfile
    18 mv $1.yourfile $1
    19 rm $1.currentsvnfile
     3#get files to check
     4if [ $# -eq 0 ]
     5then
     6        echo "no file specified"
     7        return
     8fi
     9
     10#first, check that all files exist
     11for FILE in $*
     12do
     13        if [ ! -f "$FILE" ]
     14        then
     15                echo "File $FILE not found!" >&2   # Error message to stderr.
     16                exit 1
     17        fi
     18done
     19
     20#svn diff all files
     21for FILE in $*
     22do
     23
     24        FILENAME=$(basename $FILE);
     25        EXT=${FILENAME/*./}
     26        RELEASE=$(svn info $FILE | grep "Revision" | awk '{ print $2 }')
     27
     28        YOUFILE="YOUR_FILE"."$EXT"
     29        SVNFILE="SVN_FILE"."$EXT"
     30
     31        mv $FILE $YOUFILE
     32        svn update $FILE
     33        mv $FILE $SVNFILE
     34
     35        vimdiff $YOUFILE $SVNFILE
     36
     37        svn update -r$RELEASE $FILE
     38        mv $YOUFILE $FILE
     39        rm $SVNFILE
     40done
Note: See TracChangeset for help on using the changeset viewer.