Seeing a combined diff of many commits in subversion?

前端 未结 6 813
死守一世寂寞
死守一世寂寞 2021-02-05 20:23

I have been asked to review the changes made in SVN revision number 123, 178, 199, 245 and 288 - which are all the commits related to a specific feature. What is the reasonable

6条回答
  •  野性不改
    2021-02-05 20:41

    Even though this question is long over with, I actually wrote out a script today that is along these lines:

    
    #!/bin/bash
    
    REVISIONS=$@
    LAST_REVISION="NULL"
    MASTER="master"                             # path to WC
    
    for THIS_REVISION in ${REVISIONS[@]};
    do 
        if [ "$LAST_REVISION" != "NULL" ];
        then
            svn diff $MASTER -r ${LAST_REVISION}:${THIS_REVISION} --summarize | while read f;   
            do
                echo ${f#* } | sed "s/[a-zA-Z0-9:\/.]*$MASTER\///" >> "$LAST_REVISION-to-$THIS_REVISION.log"
            done
        fi
    
        LAST_REVISION=$THIS_REVISION
    done
    

    and you can call it like "my_diff_script.sh rev1 rev2 rev3 rev4"

    the output would be:

    rev1-to-rev2.log 
    rev2-to-rev3.log
    rev3-to-rev4.log
    

提交回复
热议问题