We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DVC status fails after using add -R
Hey :)

I have a folder of files I added with 
$$ dvc add -R raw_data

Then I've imported the folder in other git repo using
$$ dvc import -o data --rev raw-v1 https://...@bitbucket.org/.../raw_data_reg.git raw_data

Then when execute dvc status I get an error message

```
$$ dvc status -v

2020-06-29 13:54:52,056 DEBUG: fetched: [(3,)]                                  
2020-06-29 13:54:52,059 DEBUG: Creating external repo https://...@bitbucket.org/.../raw_data_reg.git@43fb50fb519d58415bba4903b480f44811fefec1
2020-06-29 13:54:52,059 DEBUG: erepo: git clone https://...@bitbucket.org/.../raw_data_reg.git to a temporary dir
Cloning                                                                     |0.00 [00:00,      ?obj/s]Password for 'https://...@bitbucket.org':
2020-06-29 13:54:58,709 DEBUG: fetched: [(17,)]                                                      
2020-06-29 13:54:58,728 ERROR: failed to obtain data status - get_hash() takes 2 positional arguments but 3 were given
------------------------------------------------------------
Traceback (most recent call last):
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/dependency/repo.py", line 57, in _get_checksum
    return repo.find_out_by_relpath(self.def_path).info["md5"]
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/__init__.py", line 566, in find_out_by_relpath
    (out,) = self.find_outs_by_path(path)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/__init__.py", line 560, in find_outs_by_path
    raise OutputNotFoundError(path, self)
dvc.exceptions.OutputNotFoundError: Unable to find DVC-file with output '../../../tmp/tmpq5w4msxhdvc-clone/raw_data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/command/status.py", line 51, in run
    recursive=self.args.recursive,
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/__init__.py", line 35, in wrapper
    ret = f(repo, *args, **kwargs)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/status.py", line 146, in status
    self, targets, with_deps=with_deps, recursive=recursive
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/status.py", line 37, in _local_status
    return _joint_status(stages)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/status.py", line 23, in _joint_status
    status.update(stage.status(check_updates=True))
  File "/home/moshe/.local/lib/python3.6/site-packages/funcy/decorators.py", line 39, in wrapper
    return deco(call, *dargs, **dkwargs)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/decorators.py", line 35, in rwlocked
    return call()
  File "/home/moshe/.local/lib/python3.6/site-packages/funcy/decorators.py", line 60, in __call__
    return self._func(*self._args, **self._kwargs)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/__init__.py", line 469, in status
    self._status_deps(ret)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/__init__.py", line 485, in _status_deps
    deps_status = self._status(self.deps)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/__init__.py", line 480, in _status
    ret.update(entry.status())
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/dependency/repo.py", line 71, in status
    current_checksum = self._get_checksum(locked=True)
  File "/home/moshe/.local/lib/python3.6/site-packages/dvc/dependency/repo.py", line 67, in _get_checksum
    return self.repo.cache.local.get_hash(path, tree)
TypeError: get_hash() takes 2 positional arguments but 3 were given
------------------------------------------------------------

$$ dvc version
DVC version: 1.0.1
Python version: 3.6.9
Platform: Linux-5.3.0-61-generic-x86_64-with-Ubuntu-18.04-bionic
Binary: False
Package: pip
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('ext4', '/dev/sda1')
Repo: dvc, git
Filesystem type (workspace): ('ext4', '/dev/sda1')
```

Do you know what could be the problem?
Thanks.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dvc/dependency/repo.py`
Content:
```
1 import os
2 
3 from voluptuous import Required
4 
5 from dvc.exceptions import OutputNotFoundError
6 from dvc.path_info import PathInfo
7 
8 from .local import LocalDependency
9 
10 
11 class RepoDependency(LocalDependency):
12     PARAM_REPO = "repo"
13     PARAM_URL = "url"
14     PARAM_REV = "rev"
15     PARAM_REV_LOCK = "rev_lock"
16 
17     REPO_SCHEMA = {
18         PARAM_REPO: {
19             Required(PARAM_URL): str,
20             PARAM_REV: str,
21             PARAM_REV_LOCK: str,
22         }
23     }
24 
25     def __init__(self, def_repo, stage, *args, **kwargs):
26         self.def_repo = def_repo
27         super().__init__(stage, *args, **kwargs)
28 
29     def _parse_path(self, remote, path):
30         return None
31 
32     @property
33     def is_in_repo(self):
34         return False
35 
36     @property
37     def repo_pair(self):
38         d = self.def_repo
39         rev = d.get(self.PARAM_REV_LOCK) or d.get(self.PARAM_REV)
40         return d[self.PARAM_URL], rev
41 
42     def __str__(self):
43         return "{} ({})".format(self.def_path, self.def_repo[self.PARAM_URL])
44 
45     def _make_repo(self, *, locked=True):
46         from dvc.external_repo import external_repo
47 
48         d = self.def_repo
49         rev = (d.get("rev_lock") if locked else None) or d.get("rev")
50         return external_repo(d["url"], rev=rev)
51 
52     def _get_checksum(self, locked=True):
53         from dvc.repo.tree import RepoTree
54 
55         with self._make_repo(locked=locked) as repo:
56             try:
57                 return repo.find_out_by_relpath(self.def_path).info["md5"]
58             except OutputNotFoundError:
59                 path = PathInfo(os.path.join(repo.root_dir, self.def_path))
60 
61                 # we want stream but not fetch, so DVC out directories are
62                 # walked, but dir contents is not fetched
63                 tree = RepoTree(repo, stream=True)
64 
65                 # We are polluting our repo cache with some dir listing here
66                 if tree.isdir(path):
67                     return self.repo.cache.local.get_hash(path, tree)
68                 return tree.get_file_hash(path)
69 
70     def status(self):
71         current_checksum = self._get_checksum(locked=True)
72         updated_checksum = self._get_checksum(locked=False)
73 
74         if current_checksum != updated_checksum:
75             return {str(self): "update available"}
76 
77         return {}
78 
79     def save(self):
80         pass
81 
82     def dumpd(self):
83         return {self.PARAM_PATH: self.def_path, self.PARAM_REPO: self.def_repo}
84 
85     def download(self, to):
86         with self._make_repo() as repo:
87             if self.def_repo.get(self.PARAM_REV_LOCK) is None:
88                 self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()
89 
90             cache = self.repo.cache.local
91             with repo.use_cache(cache):
92                 _, _, cache_infos = repo.fetch_external([self.def_path])
93             cache.checkout(to.path_info, cache_infos[0])
94 
95     def update(self, rev=None):
96         if rev:
97             self.def_repo[self.PARAM_REV] = rev
98 
99         with self._make_repo(locked=False) as repo:
100             self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()
101
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dvc/dependency/repo.py b/dvc/dependency/repo.py
--- a/dvc/dependency/repo.py
+++ b/dvc/dependency/repo.py
@@ -64,7 +64,7 @@
 
                 # We are polluting our repo cache with some dir listing here
                 if tree.isdir(path):
-                    return self.repo.cache.local.get_hash(path, tree)
+                    return self.repo.cache.local.get_hash(path, tree=tree)
                 return tree.get_file_hash(path)
 
     def status(self):

{"golden_diff": "diff --git a/dvc/dependency/repo.py b/dvc/dependency/repo.py\n--- a/dvc/dependency/repo.py\n+++ b/dvc/dependency/repo.py\n@@ -64,7 +64,7 @@\n \n                 # We are polluting our repo cache with some dir listing here\n                 if tree.isdir(path):\n-                    return self.repo.cache.local.get_hash(path, tree)\n+                    return self.repo.cache.local.get_hash(path, tree=tree)\n                 return tree.get_file_hash(path)\n \n     def status(self):\n", "issue": "DVC status fails after using add -R\nHey :)\r\n\r\nI have a folder of files I added with \r\n$$ dvc add -R raw_data\r\n\r\nThen I've imported the folder in other git repo using\r\n$$ dvc import -o data --rev raw-v1 https://...@bitbucket.org/.../raw_data_reg.git raw_data\r\n\r\nThen when execute dvc status I get an error message\r\n\r\n```\r\n$$ dvc status -v\r\n\r\n2020-06-29 13:54:52,056 DEBUG: fetched: [(3,)]                                  \r\n2020-06-29 13:54:52,059 DEBUG: Creating external repo https://...@bitbucket.org/.../raw_data_reg.git@43fb50fb519d58415bba4903b480f44811fefec1\r\n2020-06-29 13:54:52,059 DEBUG: erepo: git clone https://...@bitbucket.org/.../raw_data_reg.git to a temporary dir\r\nCloning                                                                     |0.00 [00:00,      ?obj/s]Password for 'https://...@bitbucket.org':\r\n2020-06-29 13:54:58,709 DEBUG: fetched: [(17,)]                                                      \r\n2020-06-29 13:54:58,728 ERROR: failed to obtain data status - get_hash() takes 2 positional arguments but 3 were given\r\n------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/dependency/repo.py\", line 57, in _get_checksum\r\n    return repo.find_out_by_relpath(self.def_path).info[\"md5\"]\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/__init__.py\", line 566, in find_out_by_relpath\r\n    (out,) = self.find_outs_by_path(path)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/__init__.py\", line 560, in find_outs_by_path\r\n    raise OutputNotFoundError(path, self)\r\ndvc.exceptions.OutputNotFoundError: Unable to find DVC-file with output '../../../tmp/tmpq5w4msxhdvc-clone/raw_data'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/command/status.py\", line 51, in run\r\n    recursive=self.args.recursive,\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/__init__.py\", line 35, in wrapper\r\n    ret = f(repo, *args, **kwargs)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/status.py\", line 146, in status\r\n    self, targets, with_deps=with_deps, recursive=recursive\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/status.py\", line 37, in _local_status\r\n    return _joint_status(stages)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/repo/status.py\", line 23, in _joint_status\r\n    status.update(stage.status(check_updates=True))\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/funcy/decorators.py\", line 39, in wrapper\r\n    return deco(call, *dargs, **dkwargs)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/decorators.py\", line 35, in rwlocked\r\n    return call()\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/funcy/decorators.py\", line 60, in __call__\r\n    return self._func(*self._args, **self._kwargs)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/__init__.py\", line 469, in status\r\n    self._status_deps(ret)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/__init__.py\", line 485, in _status_deps\r\n    deps_status = self._status(self.deps)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/stage/__init__.py\", line 480, in _status\r\n    ret.update(entry.status())\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/dependency/repo.py\", line 71, in status\r\n    current_checksum = self._get_checksum(locked=True)\r\n  File \"/home/moshe/.local/lib/python3.6/site-packages/dvc/dependency/repo.py\", line 67, in _get_checksum\r\n    return self.repo.cache.local.get_hash(path, tree)\r\nTypeError: get_hash() takes 2 positional arguments but 3 were given\r\n------------------------------------------------------------\r\n\r\n$$ dvc version\r\nDVC version: 1.0.1\r\nPython version: 3.6.9\r\nPlatform: Linux-5.3.0-61-generic-x86_64-with-Ubuntu-18.04-bionic\r\nBinary: False\r\nPackage: pip\r\nSupported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss\r\nCache: reflink - not supported, hardlink - supported, symlink - supported\r\nFilesystem type (cache directory): ('ext4', '/dev/sda1')\r\nRepo: dvc, git\r\nFilesystem type (workspace): ('ext4', '/dev/sda1')\r\n```\r\n\r\nDo you know what could be the problem?\r\nThanks.\r\n\n", "before_files": [{"content": "import os\n\nfrom voluptuous import Required\n\nfrom dvc.exceptions import OutputNotFoundError\nfrom dvc.path_info import PathInfo\n\nfrom .local import LocalDependency\n\n\nclass RepoDependency(LocalDependency):\n    PARAM_REPO = \"repo\"\n    PARAM_URL = \"url\"\n    PARAM_REV = \"rev\"\n    PARAM_REV_LOCK = \"rev_lock\"\n\n    REPO_SCHEMA = {\n        PARAM_REPO: {\n            Required(PARAM_URL): str,\n            PARAM_REV: str,\n            PARAM_REV_LOCK: str,\n        }\n    }\n\n    def __init__(self, def_repo, stage, *args, **kwargs):\n        self.def_repo = def_repo\n        super().__init__(stage, *args, **kwargs)\n\n    def _parse_path(self, remote, path):\n        return None\n\n    @property\n    def is_in_repo(self):\n        return False\n\n    @property\n    def repo_pair(self):\n        d = self.def_repo\n        rev = d.get(self.PARAM_REV_LOCK) or d.get(self.PARAM_REV)\n        return d[self.PARAM_URL], rev\n\n    def __str__(self):\n        return \"{} ({})\".format(self.def_path, self.def_repo[self.PARAM_URL])\n\n    def _make_repo(self, *, locked=True):\n        from dvc.external_repo import external_repo\n\n        d = self.def_repo\n        rev = (d.get(\"rev_lock\") if locked else None) or d.get(\"rev\")\n        return external_repo(d[\"url\"], rev=rev)\n\n    def _get_checksum(self, locked=True):\n        from dvc.repo.tree import RepoTree\n\n        with self._make_repo(locked=locked) as repo:\n            try:\n                return repo.find_out_by_relpath(self.def_path).info[\"md5\"]\n            except OutputNotFoundError:\n                path = PathInfo(os.path.join(repo.root_dir, self.def_path))\n\n                # we want stream but not fetch, so DVC out directories are\n                # walked, but dir contents is not fetched\n                tree = RepoTree(repo, stream=True)\n\n                # We are polluting our repo cache with some dir listing here\n                if tree.isdir(path):\n                    return self.repo.cache.local.get_hash(path, tree)\n                return tree.get_file_hash(path)\n\n    def status(self):\n        current_checksum = self._get_checksum(locked=True)\n        updated_checksum = self._get_checksum(locked=False)\n\n        if current_checksum != updated_checksum:\n            return {str(self): \"update available\"}\n\n        return {}\n\n    def save(self):\n        pass\n\n    def dumpd(self):\n        return {self.PARAM_PATH: self.def_path, self.PARAM_REPO: self.def_repo}\n\n    def download(self, to):\n        with self._make_repo() as repo:\n            if self.def_repo.get(self.PARAM_REV_LOCK) is None:\n                self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()\n\n            cache = self.repo.cache.local\n            with repo.use_cache(cache):\n                _, _, cache_infos = repo.fetch_external([self.def_path])\n            cache.checkout(to.path_info, cache_infos[0])\n\n    def update(self, rev=None):\n        if rev:\n            self.def_repo[self.PARAM_REV] = rev\n\n        with self._make_repo(locked=False) as repo:\n            self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()\n", "path": "dvc/dependency/repo.py"}], "after_files": [{"content": "import os\n\nfrom voluptuous import Required\n\nfrom dvc.exceptions import OutputNotFoundError\nfrom dvc.path_info import PathInfo\n\nfrom .local import LocalDependency\n\n\nclass RepoDependency(LocalDependency):\n    PARAM_REPO = \"repo\"\n    PARAM_URL = \"url\"\n    PARAM_REV = \"rev\"\n    PARAM_REV_LOCK = \"rev_lock\"\n\n    REPO_SCHEMA = {\n        PARAM_REPO: {\n            Required(PARAM_URL): str,\n            PARAM_REV: str,\n            PARAM_REV_LOCK: str,\n        }\n    }\n\n    def __init__(self, def_repo, stage, *args, **kwargs):\n        self.def_repo = def_repo\n        super().__init__(stage, *args, **kwargs)\n\n    def _parse_path(self, remote, path):\n        return None\n\n    @property\n    def is_in_repo(self):\n        return False\n\n    @property\n    def repo_pair(self):\n        d = self.def_repo\n        rev = d.get(self.PARAM_REV_LOCK) or d.get(self.PARAM_REV)\n        return d[self.PARAM_URL], rev\n\n    def __str__(self):\n        return \"{} ({})\".format(self.def_path, self.def_repo[self.PARAM_URL])\n\n    def _make_repo(self, *, locked=True):\n        from dvc.external_repo import external_repo\n\n        d = self.def_repo\n        rev = (d.get(\"rev_lock\") if locked else None) or d.get(\"rev\")\n        return external_repo(d[\"url\"], rev=rev)\n\n    def _get_checksum(self, locked=True):\n        from dvc.repo.tree import RepoTree\n\n        with self._make_repo(locked=locked) as repo:\n            try:\n                return repo.find_out_by_relpath(self.def_path).info[\"md5\"]\n            except OutputNotFoundError:\n                path = PathInfo(os.path.join(repo.root_dir, self.def_path))\n\n                # we want stream but not fetch, so DVC out directories are\n                # walked, but dir contents is not fetched\n                tree = RepoTree(repo, stream=True)\n\n                # We are polluting our repo cache with some dir listing here\n                if tree.isdir(path):\n                    return self.repo.cache.local.get_hash(path, tree=tree)\n                return tree.get_file_hash(path)\n\n    def status(self):\n        current_checksum = self._get_checksum(locked=True)\n        updated_checksum = self._get_checksum(locked=False)\n\n        if current_checksum != updated_checksum:\n            return {str(self): \"update available\"}\n\n        return {}\n\n    def save(self):\n        pass\n\n    def dumpd(self):\n        return {self.PARAM_PATH: self.def_path, self.PARAM_REPO: self.def_repo}\n\n    def download(self, to):\n        with self._make_repo() as repo:\n            if self.def_repo.get(self.PARAM_REV_LOCK) is None:\n                self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()\n\n            cache = self.repo.cache.local\n            with repo.use_cache(cache):\n                _, _, cache_infos = repo.fetch_external([self.def_path])\n            cache.checkout(to.path_info, cache_infos[0])\n\n    def update(self, rev=None):\n        if rev:\n            self.def_repo[self.PARAM_REV] = rev\n\n        with self._make_repo(locked=False) as repo:\n            self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()\n", "path": "dvc/dependency/repo.py"}]}