We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
pull: wrong warning on pulling import stage
Script to reproduce:

```
mkdir test
dvc import https://github.com/iterative/example-get-started model.pkl
git add .
git commit -am "init"
cd ..
git clone test test1
cd test1
dvc pull
```

outputs only:

```
WARNING: DVC-file 'model.pkl.dvc' is locked. Its dependencies are not going to be checked out.
```

I think there should be no warning, especially considering that it has done the job - pulled the `model.pkl`. Like we discussed in #2667 there should be some statistics instead.



--- 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/repo/checkout.py`
Content:
```
1 from __future__ import unicode_literals
2 
3 import logging
4 
5 from dvc.exceptions import CheckoutErrorSuggestGit, CheckoutError
6 from dvc.progress import Tqdm
7 
8 
9 logger = logging.getLogger(__name__)
10 
11 
12 def _cleanup_unused_links(self, all_stages):
13     used = [
14         out.fspath
15         for stage in all_stages
16         for out in stage.outs
17         if out.scheme == "local"
18     ]
19     self.state.remove_unused_links(used)
20 
21 
22 def get_all_files_numbers(stages):
23     return sum(stage.get_all_files_number() for stage in stages)
24 
25 
26 def _checkout(
27     self, targets=None, with_deps=False, force=False, recursive=False
28 ):
29     from dvc.stage import StageFileDoesNotExistError, StageFileBadNameError
30 
31     stages = set()
32     targets = targets or [None]
33     for target in targets:
34         try:
35             new = self.collect(
36                 target, with_deps=with_deps, recursive=recursive
37             )
38             stages.update(new)
39         except (StageFileDoesNotExistError, StageFileBadNameError) as exc:
40             if not target:
41                 raise
42             raise CheckoutErrorSuggestGit(target, exc)
43 
44     _cleanup_unused_links(self, self.stages)
45     total = get_all_files_numbers(stages)
46     if total == 0:
47         logger.info("Nothing to do")
48     failed = []
49     with Tqdm(
50         total=total, unit="file", desc="Checkout", disable=total == 0
51     ) as pbar:
52         for stage in stages:
53             if stage.locked:
54                 logger.warning(
55                     "DVC-file '{path}' is locked. Its dependencies are"
56                     " not going to be checked out.".format(path=stage.relpath)
57                 )
58 
59             failed.extend(
60                 stage.checkout(force=force, progress_callback=pbar.update_desc)
61             )
62     if failed:
63         raise CheckoutError(failed)
64
```

Path: `dvc/repo/pull.py`
Content:
```
1 from __future__ import unicode_literals
2 
3 from . import locked
4 
5 
6 @locked
7 def pull(
8     self,
9     targets=None,
10     jobs=None,
11     remote=None,
12     all_branches=False,
13     with_deps=False,
14     all_tags=False,
15     force=False,
16     recursive=False,
17 ):
18     processed_files_count = self._fetch(
19         targets,
20         jobs,
21         remote=remote,
22         all_branches=all_branches,
23         all_tags=all_tags,
24         with_deps=with_deps,
25         recursive=recursive,
26     )
27     self._checkout(
28         targets=targets, with_deps=with_deps, force=force, recursive=recursive
29     )
30     return processed_files_count
31
```
--- 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/repo/checkout.py b/dvc/repo/checkout.py
--- a/dvc/repo/checkout.py
+++ b/dvc/repo/checkout.py
@@ -50,12 +50,6 @@
         total=total, unit="file", desc="Checkout", disable=total == 0
     ) as pbar:
         for stage in stages:
-            if stage.locked:
-                logger.warning(
-                    "DVC-file '{path}' is locked. Its dependencies are"
-                    " not going to be checked out.".format(path=stage.relpath)
-                )
-
             failed.extend(
                 stage.checkout(force=force, progress_callback=pbar.update_desc)
             )
diff --git a/dvc/repo/pull.py b/dvc/repo/pull.py
--- a/dvc/repo/pull.py
+++ b/dvc/repo/pull.py
@@ -1,6 +1,11 @@
 from __future__ import unicode_literals
 
-from . import locked
+import logging
+
+from dvc.repo import locked
+
+
+logger = logging.getLogger(__name__)
 
 
 @locked

{"golden_diff": "diff --git a/dvc/repo/checkout.py b/dvc/repo/checkout.py\n--- a/dvc/repo/checkout.py\n+++ b/dvc/repo/checkout.py\n@@ -50,12 +50,6 @@\n         total=total, unit=\"file\", desc=\"Checkout\", disable=total == 0\n     ) as pbar:\n         for stage in stages:\n-            if stage.locked:\n-                logger.warning(\n-                    \"DVC-file '{path}' is locked. Its dependencies are\"\n-                    \" not going to be checked out.\".format(path=stage.relpath)\n-                )\n-\n             failed.extend(\n                 stage.checkout(force=force, progress_callback=pbar.update_desc)\n             )\ndiff --git a/dvc/repo/pull.py b/dvc/repo/pull.py\n--- a/dvc/repo/pull.py\n+++ b/dvc/repo/pull.py\n@@ -1,6 +1,11 @@\n from __future__ import unicode_literals\n \n-from . import locked\n+import logging\n+\n+from dvc.repo import locked\n+\n+\n+logger = logging.getLogger(__name__)\n \n \n @locked\n", "issue": "pull: wrong warning on pulling import stage\nScript to reproduce:\r\n\r\n```\r\nmkdir test\r\ndvc import https://github.com/iterative/example-get-started model.pkl\r\ngit add .\r\ngit commit -am \"init\"\r\ncd ..\r\ngit clone test test1\r\ncd test1\r\ndvc pull\r\n```\r\n\r\noutputs only:\r\n\r\n```\r\nWARNING: DVC-file 'model.pkl.dvc' is locked. Its dependencies are not going to be checked out.\r\n```\r\n\r\nI think there should be no warning, especially considering that it has done the job - pulled the `model.pkl`. Like we discussed in #2667 there should be some statistics instead.\r\n\r\n\n", "before_files": [{"content": "from __future__ import unicode_literals\n\nimport logging\n\nfrom dvc.exceptions import CheckoutErrorSuggestGit, CheckoutError\nfrom dvc.progress import Tqdm\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef _cleanup_unused_links(self, all_stages):\n    used = [\n        out.fspath\n        for stage in all_stages\n        for out in stage.outs\n        if out.scheme == \"local\"\n    ]\n    self.state.remove_unused_links(used)\n\n\ndef get_all_files_numbers(stages):\n    return sum(stage.get_all_files_number() for stage in stages)\n\n\ndef _checkout(\n    self, targets=None, with_deps=False, force=False, recursive=False\n):\n    from dvc.stage import StageFileDoesNotExistError, StageFileBadNameError\n\n    stages = set()\n    targets = targets or [None]\n    for target in targets:\n        try:\n            new = self.collect(\n                target, with_deps=with_deps, recursive=recursive\n            )\n            stages.update(new)\n        except (StageFileDoesNotExistError, StageFileBadNameError) as exc:\n            if not target:\n                raise\n            raise CheckoutErrorSuggestGit(target, exc)\n\n    _cleanup_unused_links(self, self.stages)\n    total = get_all_files_numbers(stages)\n    if total == 0:\n        logger.info(\"Nothing to do\")\n    failed = []\n    with Tqdm(\n        total=total, unit=\"file\", desc=\"Checkout\", disable=total == 0\n    ) as pbar:\n        for stage in stages:\n            if stage.locked:\n                logger.warning(\n                    \"DVC-file '{path}' is locked. Its dependencies are\"\n                    \" not going to be checked out.\".format(path=stage.relpath)\n                )\n\n            failed.extend(\n                stage.checkout(force=force, progress_callback=pbar.update_desc)\n            )\n    if failed:\n        raise CheckoutError(failed)\n", "path": "dvc/repo/checkout.py"}, {"content": "from __future__ import unicode_literals\n\nfrom . import locked\n\n\n@locked\ndef pull(\n    self,\n    targets=None,\n    jobs=None,\n    remote=None,\n    all_branches=False,\n    with_deps=False,\n    all_tags=False,\n    force=False,\n    recursive=False,\n):\n    processed_files_count = self._fetch(\n        targets,\n        jobs,\n        remote=remote,\n        all_branches=all_branches,\n        all_tags=all_tags,\n        with_deps=with_deps,\n        recursive=recursive,\n    )\n    self._checkout(\n        targets=targets, with_deps=with_deps, force=force, recursive=recursive\n    )\n    return processed_files_count\n", "path": "dvc/repo/pull.py"}], "after_files": [{"content": "from __future__ import unicode_literals\n\nimport logging\n\nfrom dvc.exceptions import CheckoutErrorSuggestGit, CheckoutError\nfrom dvc.progress import Tqdm\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef _cleanup_unused_links(self, all_stages):\n    used = [\n        out.fspath\n        for stage in all_stages\n        for out in stage.outs\n        if out.scheme == \"local\"\n    ]\n    self.state.remove_unused_links(used)\n\n\ndef get_all_files_numbers(stages):\n    return sum(stage.get_all_files_number() for stage in stages)\n\n\ndef _checkout(\n    self, targets=None, with_deps=False, force=False, recursive=False\n):\n    from dvc.stage import StageFileDoesNotExistError, StageFileBadNameError\n\n    stages = set()\n    targets = targets or [None]\n    for target in targets:\n        try:\n            new = self.collect(\n                target, with_deps=with_deps, recursive=recursive\n            )\n            stages.update(new)\n        except (StageFileDoesNotExistError, StageFileBadNameError) as exc:\n            if not target:\n                raise\n            raise CheckoutErrorSuggestGit(target, exc)\n\n    _cleanup_unused_links(self, self.stages)\n    total = get_all_files_numbers(stages)\n    if total == 0:\n        logger.info(\"Nothing to do\")\n    failed = []\n    with Tqdm(\n        total=total, unit=\"file\", desc=\"Checkout\", disable=total == 0\n    ) as pbar:\n        for stage in stages:\n            failed.extend(\n                stage.checkout(force=force, progress_callback=pbar.update_desc)\n            )\n    if failed:\n        raise CheckoutError(failed)\n", "path": "dvc/repo/checkout.py"}, {"content": "from __future__ import unicode_literals\n\nimport logging\n\nfrom dvc.repo import locked\n\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef pull(\n    self,\n    targets=None,\n    jobs=None,\n    remote=None,\n    all_branches=False,\n    with_deps=False,\n    all_tags=False,\n    force=False,\n    recursive=False,\n):\n    processed_files_count = self._fetch(\n        targets,\n        jobs,\n        remote=remote,\n        all_branches=all_branches,\n        all_tags=all_tags,\n        with_deps=with_deps,\n        recursive=recursive,\n    )\n    self._checkout(\n        targets=targets, with_deps=with_deps, force=force, recursive=recursive\n    )\n    return processed_files_count\n", "path": "dvc/repo/pull.py"}]}