Display svn changelog on "svn up"


/ Published in: Bash
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.