当前位置: 代码迷 >> 综合 >> git+gerrit clone 脚本
  详细解决方案

git+gerrit clone 脚本

热度:48   发布时间:2023-12-22 08:14:52.0

使用gerrit作为code Review平台后,克隆代码的简易方法,写了个脚本,工作中常用到:

#!/usr/bin/env python
# coding=utf-8 # for git clone helper
# author: jason 
# import os, sysGERRIT_SERVER="192.168.1.187"
GERRIT_LISTEN_PORT="29419"
GIT_REPO_NAME=""
SSH_CLONE_FULL_CMD=""
GERRIT_HOOKS_CMD="" 
WHOAMI=""def hello():print '\033[0;32;40m'#print 50*('*')print print '\tGerrit source code clone tools'print print 50*("*")print '\033[0m'def __exit(x):sys.exit(x)def error_color():print '\033[0;31;40m'def normal_color():print '\033[0m'def get_username():global WHOAMIWHOAMI = os.popen('whoami').read().strip()def prep_git_repo():global GIT_REPO_NAMEGIT_REPO_NAME=raw_input("Please input the dest Git Repository:")if (len(GIT_REPO_NAME) <= 0):
  相关解决方案