diff --git a/.gitignore b/.gitignore index 510e41c83..fe7916dbb 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ innosetup/config.ini dvc/version.py *.swp + +pip-wheel-metadata/ +.vscode/ diff --git a/dvc/remote/ssh/connection.py b/dvc/remote/ssh/connection.py index 1e69b2b0f..6071dd2ec 100644 --- a/dvc/remote/ssh/connection.py +++ b/dvc/remote/ssh/connection.py @@ -1,3 +1,4 @@ +import errno import os import posixpath @@ -143,7 +144,11 @@ class SSHConnection: def remove(self, path): self._sftp_connect() - self._sftp.remove(path) + try: + self._sftp.remove(path) + except IOError as exc: + if exc.errno != errno.ENOENT: + raise def download(self, src, dest, no_progress_bar=False, progress_title=None): self._sftp_connect() diff --git a/dvc/stage.py b/dvc/stage.py index 89eaf26f4..9c1be9339 100644 --- a/dvc/stage.py +++ b/dvc/stage.py @@ -211,10 +211,12 @@ class Stage(object): return True for dep in self.deps: - if dep.changed(): + status = dep.status() + if status: logger.warning( - "Dependency '{dep}' of '{stage}' changed.".format( - dep=dep, stage=self.relpath + "Dependency '{dep}' of '{stage}' changed because it is " + "'{status}'.".format( + dep=dep, stage=self.relpath, status=status[str(dep)] ) ) return True @@ -223,10 +225,12 @@ class Stage(object): def _changed_outs(self): for out in self.outs: - if out.changed(): + status = out.status() + if status: logger.warning( - "Output '{out}' of '{stage}' changed.".format( - out=out, stage=self.relpath + "Output '{out}' of '{stage}' changed because it is " + "'{status}'".format( + out=out, stage=self.relpath, status=status[str(out)] ) ) return True @@ -256,10 +260,13 @@ class Stage(object): return ret def remove_outs(self, ignore_remove=False): - """ - Used mainly for `dvc remove --outs` - """ + """Used mainly for `dvc remove --outs` and :func:`Stage.reproduce`.""" for out in self.outs: + logger.debug( + "Removing output '{out}' of '{stage}'.".format( + out=out, stage=self.relpath + ) + ) out.remove(ignore_remove=ignore_remove) def unprotect_outs(self):