Repository: iterative/dvc

Issue:
Data sources: how to import file in a new repo
When I clone DVC repo and do `repro` my source file does not exist and I see a strange message from the next stage:

```
Failed to reproduce 'Posts.xml.dvc': Exec command error (tar zxf data/Posts.xml.tgz -C data/):

tar: Error opening archive: Failed to open 'data/Posts.xml.tgz'
```

How to fix - add data source file back:

```
$ dvc remove data/Posts.xml.tgz
$ cp ../stackoverflow_small_xml/100K/Posts.xml.tgz data/
$ dvc add data/Posts.xml.tgz # this command is actually not required!!!
```

What to do? Basically, you should add the source file again. Let's just write this in an error message: `Failed to reproduce 'Posts.xml.dvc': data source file data/Posts.xml.tgz does not exist. Copy source file in this place and run 'dvc add data/Posts.xml.tgz'`

Questions:
1. Do we need a special support for this scenario like `dvc add --source-stage data/Posts.xml.tgz ~/Download/reuters-dataset.zip` where a file from a random place will be correctly deployed into a correct place?
2. why should we ask to add the file if it works without this command?


Discussion:

Resolving patch:
diff --git a/dvc/command/common/base.py b/dvc/command/common/base.py
--- a/dvc/command/common/base.py
+++ b/dvc/command/common/base.py
@@ -8,9 +8,9 @@
 class CmdBase(object):
     def __init__(self, args):
         if args.quiet and not args.verbose:
-            self.project.logger.be_quiet()
+            Logger.be_quiet()
         elif not args.quiet and args.verbose:
-            self.project.logger.be_verbose()
+            Logger.be_verbose()
 
         self.project = Project(self._find_root())
         self.args = args
diff --git a/dvc/project.py b/dvc/project.py
--- a/dvc/project.py
+++ b/dvc/project.py
@@ -196,7 +196,7 @@ def _reproduce_stages(self, force, node, stages):
                 stages[n].dump()
                 result.append(stages[n])
             except Exception as ex:
-                raise ReproductionError(n, ex.message)
+                raise ReproductionError(n, str(ex))
         return result
 
     def checkout(self):
diff --git a/dvc/stage.py b/dvc/stage.py
--- a/dvc/stage.py
+++ b/dvc/stage.py
@@ -158,9 +158,9 @@ def changed(self):
         if not self.use_cache:
             return super(Output, self).changed()
 
-        return os.path.exists(self.path) \
-               and os.path.exists(self.cache) \
-               and not System.samefile(self.path, self.cache)
+        return not os.path.exists(self.path) or \
+               not os.path.exists(self.cache) or \
+               not System.samefile(self.path, self.cache)
 
     def link(self, checkout=False):
         if not self.use_cache:


Test patch:
diff --git a/tests/test_repro.py b/tests/test_repro.py
--- a/tests/test_repro.py
+++ b/tests/test_repro.py
@@ -5,6 +5,7 @@
 
 from dvc.main import main
 from dvc.command.repro import CmdRepro
+from dvc.project import ReproductionError
 
 from tests.basic_env import TestDvc
 
@@ -75,6 +76,15 @@ def test(self):
         self.assertTrue(filecmp.cmp(self.file1, self.BAR))
 
 
+class TestNonExistingOutput(TestRepro):
+    def test(self):
+        os.chmod(self.FOO, stat.S_IWRITE)
+        os.unlink(self.FOO)
+
+        with self.assertRaises(ReproductionError) as cx:
+            self.dvc.reproduce(self.file1_stage)
+
+
 class TestCmdRepro(TestRepro):
     def test(self):
         ret = main(['repro',