#!/bin/sh
# This is a script that help you get your team member's productivity
# by analyzing his/her code commiting in SVN repository, for the day before
#
# You can get a rough num for comparing between team members by using it in the way below
# ./svn_ana.sh SVN_ACCOUNT_NAME | wc -l
#
uname=walker
password= if [ $# -lt ]
then
echo Usage: $ ACCOUNT
echo -e " Where ACCOUNT is the SVN acconut name you want to analyze"
exit -
fi
user=$
today=`date +%Y-%m-%d`
yesterday=`date -v -1d +%Y-%m-%d`
revisions=$(svn log -r{$today}:{$yesterday} --username $uname --password $password |grep $user'\ '|awk '{print $1}')
echo "$revision"
lastrev=init
for rawrev in $revisions
do
echo "$rawrev"
rev=$(echo $rawrev|tr -d r)
rev2=`expr $rev - `
if [ "$lastrev" = "init" ]; then
lastrev=$rev
fi
dummy=$(echo $revisions|grep $rev2)
if [ $? -eq ]
then
continue
fi svn diff -r$rev2:$lastrev --username $uname --password $password --diff-cmd diff -x -d |grep -v =======================|grep -v '\---'
lastrev=init
done

最新文章

  1. php webservice
  2. java enum(枚举)的使用
  3. jquery mobile 方法收集.
  4. 拜托,这才是“Uber”的正确读法
  5. .NET中的注释种类,单行注释、多行注释、文档注释。。。
  6. Scala学习——基础篇
  7. 十二.200多万元得到的创业教训--app名字是关键
  8. 从零开始nodejs系列文章
  9. Ansible@一个有效的配置管理工具--Ansible configure management--翻译(四)
  10. Top 20 JavaScript Projects of 2017
  11. Batch Sort
  12. FMS用AS来实现拉流
  13. Android 5.0(棒棒糖))十大新特性
  14. 【Android Developers Training】 74. 序言:通过无线连接设备
  15. log 的 debug()、 error()、 info()方法的区别
  16. 将execl里的数据批量导入数据库
  17. JSON字符串与Map互转
  18. 关于部署php遇到的坑
  19. qemu与libvirt编译与安装
  20. 详解Zookeeper原理与应用场景

热门文章

  1. PL/SQL 01 代码编写规则
  2. 【 Linux 】三大主流软件负载均衡器对比(LVS、Nginx、HAproxy)
  3. background-clip,origin属性
  4. [译]lambda表达式对 SAM (单个抽象方法类)type的处理方式
  5. tushrea知识笔记
  6. background-position 用法介绍
  7. python2和python3中的编码问题
  8. Unity中Instantiate物体失效问题
  9. 洛谷 P1012 拼数 [字符串]
  10. CodeForces 669C