diff --git a/dvc/command/destroy.py b/dvc/command/destroy.py index 996fb61a7..6b96aacd1 100644 --- a/dvc/command/destroy.py +++ b/dvc/command/destroy.py @@ -13,7 +13,7 @@ class CmdDestroy(CmdBase): if not self.args.force and not prompt(msg, False): msg = u'Cannot destroy without a confirmation from the user. ' \ u'Use \'-f\' to force.' - raise DvcException(err) + raise DvcException(msg) self.project.destroy() except Exception as exc: diff --git a/dvc/remote/gs.py b/dvc/remote/gs.py index 474cfbf5a..9413e6be1 100644 --- a/dvc/remote/gs.py +++ b/dvc/remote/gs.py @@ -16,6 +16,7 @@ from dvc.remote.base import RemoteBase from dvc.remote.local import RemoteLOCAL from dvc.config import Config from dvc.progress import progress +from dvc.exceptions import DvcException class RemoteGS(RemoteBase): diff --git a/dvc/scm.py b/dvc/scm.py index be1f533ca..7b68c1b64 100644 --- a/dvc/scm.py +++ b/dvc/scm.py @@ -53,6 +53,7 @@ class Base(object): if not branches: branches = self.list_branches() if all_branches else [saved] for branch in branches: + print("OLOLO " + branch) self.checkout(branch) yield branch self.checkout(saved) @@ -81,6 +82,7 @@ class Git(Base): super(Git, self).__init__(root_dir) import git + from git.exc import InvalidGitRepositoryError try: self.repo = git.Repo(root_dir) except InvalidGitRepositoryError: