Return to Snippet

Revision: 3195
at June 17, 2007 16:43 by zingo


Initial Code
# Get the current revision of a repository
svn_revision()
{
  svn info $@ | awk '/^Revision:/ {print $2}'
}

# Does an svn up and then displays the changelog between your previous
# version and what you just updated to.
svn_up_and_log()
{
  local old_revision=`svn_revision $@`
  local first_update=$((${old_revision} + 1))
  svn up -q $@
  if [ $(svn_revision $@) -gt ${old_revision} ]; then
    svn log -v -rHEAD:${first_update} $@
  else
    echo "No changes."
  fi
}

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

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

Initial Title
Display svn changelog on "svn up"

Initial Tags
svn, Bash

Initial Language
Bash