Repository: iterative/dvc

Issue:
Repro does not work without .git directory
In a dvc repository:
```
$ rm -rf .git
$ dvc repro featurize.dvc
Error: Unexpected error: 'Base' object has no attribute 'dir'
Having any troubles? Hit us up at dvc.org/support, we are always happy to help!
```

Discussion:
shcheklein: Looks good to me. Can we add a test? I also wonder why `isSubmodule` always True in base cc @efiop 
mroutis: Sure @shcheklein , I'm confused why the current tests didn't detect it.
efiop: With the upcoming Hg support, we will be forced to add at least a functional test for all three scm options very soon.

Thank you so much! Please feel free to merge.

Patch:
diff --git a/dvc/scm.py b/dvc/scm.py
index 5230d00a0..e49039721 100644
--- a/dvc/scm.py
+++ b/dvc/scm.py
@@ -18,6 +18,10 @@ class Base(object):
         self.project = project
         self.root_dir = root_dir
 
+    @property
+    def dir(self):
+        return None
+
     @staticmethod
     def is_repo(root_dir):
         return True


Test patch:
diff --git a/tests/test_repro.py b/tests/test_repro.py
index 70db0abdc..112386088 100644
--- a/tests/test_repro.py
+++ b/tests/test_repro.py
@@ -763,3 +763,9 @@ class TestReproShell(TestDvc):
 
         with open(fname, 'r') as fd:
             self.assertEqual(os.getenv('SHELL'), fd.read().strip())
+
+class TestReproNoSCM(TestRepro):
+    def test(self):
+        shutil.rmtree(self.dvc.scm.dir)
+        ret = main(['repro', self.file1_stage])
+        self.assertEqual(ret, 0)