git.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:raptiformica 作者: vdloo 项目源码 文件源码
def pull_origin_master(directory, host=None, port=22):
    """
    Pull origin master in a directory on the remote machine
    :param str directory: directory on the remote machine to pull origin master in
    :param str host: hostname or ip of the remote machine, None for the local machine
    :param int port: port to use to connect to the remote machine over ssh
    :return int exit_code: exit code of the remote command
    """
    log.info("Pulling origin master in {}".format(directory))
    pull_origin_master_command = 'cd {}; git pull origin master'.format(
        quote(directory)
    )
    exit_code, _, _ = run_command_print_ready(
        pull_origin_master_command, host=host, port=port,
        failure_callback=log_failure_factory(
            "Failed to pull origin master"
        ),
        buffered=False,
        shell=True
    )
    return exit_code
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号