首页 > 移动平台 > 详细

查看某一个开发者代码修改量的脚本(ios平台可用)

时间:2016-02-01 20:36:00      阅读:324      评论:0      收藏:0      [点我收藏+]
#!/bin/sh
# This is a script that help you get your team members 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=123

if [ $# -lt 1 ]
then
    echo Usage: $0 ACCOUNT
    echo -e "   Where ACCOUNT is the SVN acconut name you want to analyze"
    exit -1
fi
user=$1
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 - 1`
    if [ "$lastrev" = "init" ]; then
        lastrev=$rev
    fi
    dummy=$(echo $revisions|grep $rev2)
    if [ $? -eq 0 ]
    then
        continue
    fi

    svn diff -r$rev2:$lastrev --username $uname --password $password --diff-cmd diff -x -d |grep -v =======================|grep -v \---
    lastrev=init
done

 

查看某一个开发者代码修改量的脚本(ios平台可用)

原文:http://www.cnblogs.com/jhj117/p/5176014.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!