4359 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
  • thumbnail
    How can I view all historical changes to a file in SVN - Stack Overflow

    Sympa la fonction dans les commentaires, mais pour un gros historique, penser à rajouter un "-l 3" au svn log pour avoir seulement l'historique des 3 derniers changements.

    La version modifée avec le "-l 3" :

    !/bin/bash

    history_of_file

    #

    Outputs the full history of a given file as a sequence of

    logentry/diff pairs. The first revision of the file is emitted as

    full text since there's not previous version to compare it to.

    function history_of_file() {
    url=$1 # current url of file
    svn log -l 3 -q $url | grep -E -e "^r[[:digit:]]+" -o | cut -c2- | sort -n | {

    first revision as full text

        echo
        read r
        svn log -r$r $url@HEAD
        svn cat -r$r $url@HEAD
        echo

    remaining revisions as differences to previous revision

        while read r
        do
            echo
            svn log -r$r $url@HEAD
            svn diff -c$r $url@HEAD
            echo
        done
    }

    }

    history_of_file $1

    November 26, 2014 at 2:05:56 PM GMT+1 - permalink - archive.org - http://stackoverflow.com/questions/282802/how-can-i-view-all-historical-changes-to-a-file-in-svn
    svn history
Links per page: 20 50 100
Shaarli - The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community - Help/documentation