示例#1
0
文件: vim.py 项目: deemson/systoolbox
def diff():
    repo = Path(REPO_PATH).joinpath(VIM_FILES[0][0]).expanduser()
    system = Path(VIM_FILES[0][1]).expanduser()
    differ = 'colordiff'
    code, _, _ = call(['which', 'colordiff'])
    if code:
        differ = 'diff'
    code, out, err = call([differ, str(repo), str(system)])
    click.echo(out)
示例#2
0
def update():
    repo_path = Path(TOP_FOLDER)
    click.echo('Updating...')
    code, out, err = call(['git', '-C', str(repo_path), 'pull'])
    if code:
        message = err or out
        raise UpdateError(message)
    click.echo(out, nl=False)