コード例 #1
0
ファイル: merge.py プロジェクト: sbergot/python
def run(args):
    conf = load_conf()
    setup_client(args, conf)
    io.setup_log(conf["log"], logging.DEBUG if args.verbose else logging.INFO)
    myTree = tree.Tree(conf["merge_path"], CLIENT)
    if args.branch is None:
        args.branch = os.path.basename(repo.get_current_target())
        logging.info("using current branch: {}".format(args.branch))
    if args.revisions is None:
        last_commit = CLIENT.get_last_commit_info(myTree.branches[args.branch])
        args.revisions = [last_commit["revision"]]
        logging.info("using last commit from {user}: {revision}".format(**last_commit))
        logging.info("commit description: {description}".format(**last_commit))
    args.revisions.sort()
    if args.getlog:
        myTree.collect_logs(args.branch)
    elif args.targets:
        myTree.merge(args.branch, args.revisions, args.targets)
    else:
        myTree.merge(args.branch, args.revisions)
コード例 #2
0
ファイル: current.py プロジェクト: sbergot/python
def run(args):
    io.setup_log("c:/current", logging.DEBUG if args.verbose else logging.INFO)
    logging.info("currently on {}".format(repo.get_current_target()))
    if args.dir_list:
        repo.list_dirs(logging.info)