Esempio n. 1
0
def staged_item(uid):
    item = data.LogItem.get(uid)
    if not item:
        click.echo('No staged changes for {}'.format(uid))
    else:
        click.echo(data.compact(item))
        for line in data.details(item.diff):
            click.echo(' ' * 4 + line)
Esempio n. 2
0
def staged_item(uid):
    item = data.LogItem.get(uid)
    if not item:
        click.echo('No staged changes for {}'.format(uid))
    else:
        click.echo(data.compact(item))
        for line in data.details(item.diff):
            click.echo(' ' * 4 + line)
Esempio n. 3
0
def stage(d):
    log = change.stage_changes()
    log.reverse()
    for item in log:
        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No changes')
Esempio n. 4
0
def stage(action, name, tag, d):
    if action and (name or tag):
        resource.stage_resources(name or tag, action)
    log = change.staged_log(populate_with_changes=True)
    for item in log:
        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No changes')
Esempio n. 5
0
def stage(action, name, tag, d):
    if action and (name or tag):
        resource.stage_resources(name or tag, action)
    log = change.staged_log()
    for item in log:
        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No changes')
Esempio n. 6
0
def history(n, d, s):
    log = data.CL()
    for item in log:
        if s:
            click.echo(item.uid)
            continue

        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No history')
Esempio n. 7
0
def history(n, d, s):
    log = data.CL()
    for item in log:
        if s:
            click.echo(item.uid)
            continue

        click.echo(data.compact(item))
        if d:
            for line in data.details(item.diff):
                click.echo(' ' * 4 + line)
    if not log:
        click.echo('No history')