Guest User

Untitled

a guest
Jul 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # changes
  4. #
  5. # Outputs the change history of a given file as a sequence of logentry/diff pairs.
  6.  
  7. default_limit=5
  8.  
  9. function changes() {
  10. url=$1 # url of file
  11. limit=$2 # limit the number of diffs
  12. svn log -q $url -l $limit | grep -E -e "^r[[:digit:]]+" -o | cut -c2- | sort -n -r | {
  13.  
  14. while read r
  15. do
  16. echo
  17. svn log -r$r $url@HEAD
  18. svn diff -c$r $url@HEAD
  19. echo
  20. done
  21. }
  22. }
  23.  
  24. changes $1 ${2:-$default_limit}
Add Comment
Please, Sign In to add comment