From 65356550dda3dadc898635c18acab2b3c4beaef5 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 9 Mar 2025 20:29:23 +0000 Subject: [PATCH] Suggest full url from child manifest Fixes #683 --- CHANGELOG.rst | 1 + dfetch/manifest/project.py | 4 ++++ features/checked-project-has-dependencies.feature | 10 ++++++++++ features/updated-project-has-dependencies.feature | 10 ++++++++++ 4 files changed, 25 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 208e53ad2..f7de0e769 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,7 @@ Release 0.10.0 (unreleased) * Support python 3.13 * Fix too strict overlapping path check (#684) +* Show complete URL of child manifests (#683) Release 0.9.1 (released 2024-12-31) =================================== diff --git a/dfetch/manifest/project.py b/dfetch/manifest/project.py index 6a6a78dd7..e994c835c 100644 --- a/dfetch/manifest/project.py +++ b/dfetch/manifest/project.py @@ -426,6 +426,10 @@ def as_recommendation(self) -> "ProjectEntry": recommendation = self.copy(self) recommendation._dst = "" # pylint: disable=protected-access recommendation._patch = "" # pylint: disable=protected-access + recommendation._url = self.remote_url # pylint: disable=protected-access + recommendation._remote = "" # pylint: disable=protected-access + recommendation._remote_obj = None # pylint: disable=protected-access + recommendation._repo_path = "" # pylint: disable=protected-access return recommendation def as_yaml(self) -> Dict[str, str]: diff --git a/features/checked-project-has-dependencies.feature b/features/checked-project-has-dependencies.feature index 3b850463d..5eb42467d 100644 --- a/features/checked-project-has-dependencies.feature +++ b/features/checked-project-has-dependencies.feature @@ -48,10 +48,17 @@ Feature: Check for dependencies in projects """ manifest: version: 0.0 + remotes: + - name: github-com-dfetch-org + url-base: https://github.com/dfetch-org/test-repo + projects: - name: SomeOtherProject url: some-remote-server/SomeOtherProject.git tag: v1 + + - name: ext/test-repo-tag-v1 + tag: v1 """ And a git repository "SomeOtherProject.git" And all projects are updated in MyProject @@ -68,6 +75,9 @@ Feature: Check for dependencies in projects - name: SomeOtherProject url: some-remote-server/SomeOtherProject.git tag: v1 + - name: ext/test-repo-tag-v1 + url: https://github.com/dfetch-org/test-repo + tag: v1 """ Scenario: No recommendation is done diff --git a/features/updated-project-has-dependencies.feature b/features/updated-project-has-dependencies.feature index 8de2adffe..7588889a8 100644 --- a/features/updated-project-has-dependencies.feature +++ b/features/updated-project-has-dependencies.feature @@ -23,11 +23,18 @@ Feature: Updated project has dependencies """ manifest: version: 0.0 + remotes: + - name: github-com-dfetch-org + url-base: https://github.com/dfetch-org/test-repo + projects: - name: SomeOtherProject dst: SomeOtherProject url: some-remote-server/SomeOtherProject.git tag: v1 + + - name: ext/test-repo-tag-v1 + tag: v1 """ And a git repository "SomeProjectWithoutChild.git" When I run "dfetch update" in MyProject @@ -42,6 +49,9 @@ Feature: Updated project has dependencies - name: SomeOtherProject url: some-remote-server/SomeOtherProject.git tag: v1 + - name: ext/test-repo-tag-v1 + url: https://github.com/dfetch-org/test-repo + tag: v1 SomeProjectWithoutChild: Fetched v1 """