Ejemplo n.º 1
0
def incoming(arguments):
    """
    Shows incoming commits.
    """

    if isGit():
        out, err = executeAndReturnResponse(["git", "remote"])
        if not err and out:
            executeAndReturnResponse(["git", "remote", "update", "-p"])
            execute(["git", "log", "..@{u}"])

    if isMercurial():
        out, err = executeAndReturnResponse(["hg", "paths"])
        if not err and out:
            execute(["hg", "incoming"])

    if isBazaar():
        out, err = executeAndReturnResponse(["bzr", "missing"])
        if not err and out:
            execute(["bzr", "missing"])
Ejemplo n.º 2
0
def clone(arguments):
    '''
    Clone a repository.
    '''

    commandSets = [
        ["git", "clone"],
        ["hg", "clone"],
        ["bzr", "branch"]
        ]

    for commandSet in commandSets:
        command = commandSet
        command.extend(arguments)
        out, err = executeAndReturnResponse(command)

        if err:
            print("{0}: repository not found".format(command[0]))
        else:
            print("{0}: repository cloned!".format(command[0]))
            break