Posted By

zingo on 06/17/07


Tagged

svn Bash subversion


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

jarjar2k7
leachypeachy
jayallen
Juanje
mitry
moonbather


Display svn changelog on "svn up"


 / Published in: Bash
 

URL: http://woss.name/2007/02/01/display-svn-changelog-on-svn-up/

updates (svn up) a working copy and displays the changes

  1. # Get the current revision of a repository
  2. svn_revision()
  3. {
  4. svn info $@ | awk '/^Revision:/ {print $2}'
  5. }
  6.  
  7. # Does an svn up and then displays the changelog between your previous
  8. # version and what you just updated to.
  9. svn_up_and_log()
  10. {
  11. local old_revision=`svn_revision $@`
  12. local first_update=$((${old_revision} + 1))
  13. svn up -q $@
  14. if [ $(svn_revision $@) -gt ${old_revision} ]; then
  15. svn log -v -rHEAD:${first_update} $@
  16. else
  17. echo "No changes."
  18. fi
  19. }

Report this snippet  

You need to login to post a comment.