zoukankan      html  css  js  c++  java
  • 查看某一个开发者代码修改量的脚本(ios平台可用)

    #!/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=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
  • 相关阅读:
    HTML页引用CSS
    C#反射
    Marshal.SecureStringToBSTR
    SQL语句创建表和数据库
    抽象类和抽象方法
    3 Sum Closest
    Chapter 2: Binary Search & Sorted Array
    Spiral Matrix
    Pascal's Triangle
    Plus One
  • 原文地址:https://www.cnblogs.com/jhj117/p/5176014.html
Copyright © 2011-2022 走看看