Repository: iterative/dvc

Issue:
`dvc import -o` fails  when source is location within same project
env: dvc v0.94, pip, Ubuntu

When I run the following dvc command:

    dvc import -o my/target/loc/ . some/long/path/to/dir

I get this error message: 

```
ERROR: failed to import 'some/long/path/to/dir' from '.'. - The path '../../../some/long/path/to/dir' does not exist in the target repository '.' neither as a DVC output nor\
 as a Git-tracked file
```
I tracked the issue down to [this line](https://github.com/iterative/dvc/blob/ce946d11609597f3b1c6c05e61f2701ca8f43f5c/dvc/repo/imp_url.py#L21), where a relative prefix is incorrectly being appended to the `url`.

```python
# NOTE: when user is importing something from within his own repository
if os.path.exists(url) and path_isin(os.path.abspath(url), self.root_dir):
    url = relpath(url, wdir)
```


I'll try to put together a PR

Discussion:
efiop: Thank you @ned2 ! :tada: 

Patch:
diff --git a/dvc/repo/imp_url.py b/dvc/repo/imp_url.py
index 73420eb62..5320ea354 100644
--- a/dvc/repo/imp_url.py
+++ b/dvc/repo/imp_url.py
@@ -17,8 +17,12 @@ def imp_url(self, url, out=None, fname=None, erepo=None, locked=True):
     out = resolve_output(url, out)
     path, wdir, out = resolve_paths(self, out)
 
-    # NOTE: when user is importing something from within his own repository
-    if os.path.exists(url) and path_isin(os.path.abspath(url), self.root_dir):
+    # NOTE: when user is importing something from within their own repository
+    if (
+        erepo is None
+        and os.path.exists(url)
+        and path_isin(os.path.abspath(url), self.root_dir)
+    ):
         url = relpath(url, wdir)
 
     stage = create_stage(


Test patch:
diff --git a/tests/func/test_import.py b/tests/func/test_import.py
index 3eddc1148..6ca40fb3c 100644
--- a/tests/func/test_import.py
+++ b/tests/func/test_import.py
@@ -342,3 +342,9 @@ def test_import_pipeline_tracked_outs(
             "file:///{}".format(fspath(tmp_dir)), "bar", out="baz"
         )
         assert (erepo_dir / "baz").read_text() == "foo"
+
+
+def test_local_import(tmp_dir, dvc, scm):
+    tmp_dir.dvc_gen("foo", "foo", commit="init")
+    (tmp_dir / "outdir").mkdir()
+    dvc.imp(".", "foo", out="outdir")