mergin/cli.py
def status(ctx):
    """Show all changes in project files - upstream and local."""
    mc = ctx.obj["client"]
    if mc is None:
        return
    try:
        pull_changes, push_changes, push_changes_summary = mc.project_status(os.getcwd())
    except InvalidProject as e:
        click.secho("Invalid project directory ({})".format(str(e)), fg="red")
        return
    except ClientError as e:
        click.secho("Error: " + str(e), fg="red")
        return
    except Exception as e:
        _print_unhandled_exception()
        return

    if mc.has_unfinished_pull():
        click.secho("The previous pull has not finished completely: status "
                    "of some files may be reported incorrectly. Use "
                    "resolve_unfinished_pull command to try to fix that.", fg="yellow")

    click.secho("### Server changes:", fg="magenta")
    pretty_diff(pull_changes)
    click.secho("### Local changes:", fg="magenta")
    pretty_diff(push_changes)
    click.secho("### Local changes summary ###")
    pretty_summary(push_changes_summary)
Show all changes in project files - upstream and local.
Show all changes in project files - upstream and local.
Show all changes in project files - upstream and local .
def status(ctx):
    mc = ctx.obj["client"]
    if mc is None:
        return
    try:
        pull_changes, push_changes, push_changes_summary = mc.project_status(os.getcwd())
    except InvalidProject as e:
        click.secho("Invalid project directory ({})".format(str(e)), fg="red")
        return
    except ClientError as e:
        click.secho("Error: " + str(e), fg="red")
        return
    except Exception as e:
        _print_unhandled_exception()
        return
    if mc.has_unfinished_pull():
        click.secho("The previous pull has not finished completely: status "
                    "of some files may be reported incorrectly. Use "
                    "resolve_unfinished_pull command to try to fix that.", fg="yellow")
    click.secho("### Server changes:", fg="magenta")
    pretty_diff(pull_changes)
    click.secho("### Local changes:", fg="magenta")
    pretty_diff(push_changes)
    click.secho("### Local changes summary ###")
    pretty_summary(push_changes_summary)
def status ( ctx ) : mc = ctx . obj [ "client" ] if mc is None : return try : pull_changes , push_changes , push_changes_summary = mc . project_status ( os . getcwd ( ) ) except InvalidProject as e : click . secho ( "Invalid project directory ({})" . format ( str ( e ) ) , fg = "red" ) return except ClientError as e : click . secho ( "Error: " + str ( e ) , fg = "red" ) return except Exception as e : _print_unhandled_exception ( ) return if mc . has_unfinished_pull ( ) : click . secho ( "The previous pull has not finished completely: status " "of some files may be reported incorrectly. Use " "resolve_unfinished_pull command to try to fix that." , fg = "yellow" ) click . secho ( "### Server changes:" , fg = "magenta" ) pretty_diff ( pull_changes ) click . secho ( "### Local changes:" , fg = "magenta" ) pretty_diff ( push_changes ) click . secho ( "### Local changes summary ###" ) pretty_summary ( push_changes_summary )
Show all changes in project files - upstream and local.
Show all changes in project files - upstream and local .
"""Show all changes in project files - upstream and local."""
ctx