feat(mirrors): support URL-only MIRRORS entries and keep git config clean
- Allow MIRRORS to contain plain URLs (one per line) in addition to legacy "NAME URL" - Treat strings as single URLs to avoid iterable pitfalls - Write PyPI URLs as metadata-only entries (never added to git config) - Keep MIRRORS as the single source of truth for mirror setup - Update integration test to assert URL-only MIRRORS output https://chatgpt.com/share/6941a9aa-b8b4-800f-963d-2486b34856b1
This commit is contained in:
@@ -75,12 +75,12 @@ class TestCreateRepoPypiNotInGitConfig(unittest.TestCase):
|
||||
|
||||
mirrors_content = mirrors_file.read_text(encoding="utf-8")
|
||||
self.assertIn(
|
||||
"pypi https://pypi.org/project/repo/",
|
||||
"https://pypi.org/project/repo/",
|
||||
mirrors_content,
|
||||
"PyPI mirror entry must exist in MIRRORS",
|
||||
)
|
||||
self.assertIn(
|
||||
"origin git@github.com:acme/repo.git",
|
||||
"git@github.com:acme/repo.git",
|
||||
mirrors_content,
|
||||
"origin SSH URL must exist in MIRRORS",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user