From 565e4a5079a3bbaf6adb957f51d381bbba8138f6 Mon Sep 17 00:00:00 2001 From: Bruno Deferrari Date: Wed, 26 Feb 2020 01:31:44 -0300 Subject: [PATCH] erepo: add comment explaining that old relative paths are restored (#2756) --- dvc/external_repo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dvc/external_repo.py b/dvc/external_repo.py index 8ea8d9a059..144fd46a80 100644 --- a/dvc/external_repo.py +++ b/dvc/external_repo.py @@ -138,6 +138,9 @@ def _fix_upstream(self): src_repo.close() def _fix_local_remote(self, src_repo, remote_name): + # If a remote URL is relative to the source repo, + # it will have changed upon config load and made + # relative to this new repo. Restore the old one here. new_remote = self.config["remote"][remote_name] old_remote = src_repo.config["remote"][remote_name] if new_remote["url"] != old_remote["url"]: