From 235d4c9a94603131e00c9b770125584fdb369481 Mon Sep 17 00:00:00 2001 From: Alexei Tenitski Date: Tue, 20 Oct 2020 06:38:05 +1300 Subject: [PATCH] #1618 Custom message when cache and remote are in sync (#4694) * #1618 Custom message when cache and remote are in sync * Output the correct remote name during dvc status * Simplify logic --- dvc/command/status.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dvc/command/status.py b/dvc/command/status.py index 75cbd9565f..8d24960504 100644 --- a/dvc/command/status.py +++ b/dvc/command/status.py @@ -11,6 +11,7 @@ class CmdDataStatus(CmdDataBase): STATUS_LEN = 20 STATUS_INDENT = "\t" UP_TO_DATE_MSG = "Data and pipelines are up to date." + IN_SYNC_MSG = "Cache and remote '{remote}' are in sync." EMPTY_PROJECT_MSG = ( "There are no data or pipelines tracked in this project yet.\n" "See {link} to get started!" @@ -68,6 +69,11 @@ def run(self): self._show(st, indent) elif not self.repo.stages: logger.info(self.EMPTY_PROJECT_MSG) + elif self.args.cloud or self.args.remote: + remote = self.args.remote or self.repo.config["core"].get( + "remote" + ) + logger.info(self.IN_SYNC_MSG.format(remote=remote)) else: logger.info(self.UP_TO_DATE_MSG)