1010 get_management_command ,
1111 get_repos ,
1212 repo_clone ,
13- repo_fetch ,
1413 repo_install ,
1514 repo_status ,
1615 repo_update ,
@@ -45,7 +44,7 @@ def repo(ctx, list_repos):
4544 Run Django fork and third-party library tests.
4645 """
4746 ctx .obj = Repo ()
48- repos , url_pattern , branch_pattern , upstream_pattern = get_repos ("pyproject.toml" )
47+ repos , url_pattern , branch_pattern = get_repos ("pyproject.toml" )
4948 if list_repos :
5049 for repo_entry in repos :
5150 click .echo (repo_entry )
@@ -70,7 +69,7 @@ def repo(ctx, list_repos):
7069@pass_repo
7170def clone (repo , ctx , repo_names , all_repos , install ):
7271 """Clone repositories from `pyproject.toml`."""
73- repos , url_pattern , branch_pattern , upstream_pattern = get_repos ("pyproject.toml" )
72+ repos , url_pattern , branch_pattern = get_repos ("pyproject.toml" )
7473
7574 if repo_names :
7675 for repo_name in repo_names :
@@ -123,9 +122,7 @@ def install(repo, ctx, repo_names, all_repos):
123122 return
124123
125124 if all_repos :
126- repos , url_pattern , branch_pattern , upstream_pattern = get_repos (
127- "pyproject.toml"
128- )
125+ repos , url_pattern , branch_pattern = get_repos ("pyproject.toml" )
129126 for repo_entry in repos :
130127 url_match = url_pattern .search (repo_entry )
131128 if url_match :
@@ -140,40 +137,6 @@ def install(repo, ctx, repo_names, all_repos):
140137 click .echo (ctx .get_help ())
141138
142139
143- @repo .command ()
144- @click .argument ("repo_names" , nargs = - 1 )
145- @click .option (
146- "-a" ,
147- "--all-repos" ,
148- is_flag = True ,
149- )
150- @click .pass_context
151- @pass_repo
152- def fetch (repo , ctx , repo_names , all_repos ):
153- """Add and fetch upstream remotes for cloned repositories."""
154- repos , url_pattern , _ , upstream_pattern = get_repos ("pyproject.toml" )
155- if repo_names :
156- for repo_name in repo_names :
157- click .echo (f"Fetching upstream for { repo_name } ..." )
158- for repo_entry in repos :
159- if (
160- os .path .basename (url_pattern .search (repo_entry ).group (0 ))
161- == repo_name
162- ):
163- repo_fetch (repo_entry , upstream_pattern , url_pattern , repo )
164- click .echo (f"Repository '{ repo_name } ' not found." )
165- return
166-
167- if all_repos :
168- click .echo (f"Fetching upstream remotes for { len (repos )} repositories..." )
169- for repo_entry in repos :
170- repo_fetch (repo_entry , upstream_pattern , url_pattern , repo )
171- return
172-
173- if ctx .args == []:
174- click .echo (ctx .get_help ())
175-
176-
177140@repo .command ()
178141@click .argument ("repo_names" , nargs = - 1 )
179142@click .option (
@@ -218,7 +181,7 @@ def makemigrations(
218181):
219182 """Run `makemigrations` for cloned repositories."""
220183
221- repos , url_pattern , branch_pattern , upstream_pattern = get_repos ("pyproject.toml" )
184+ repos , url_pattern , branch_pattern = get_repos ("pyproject.toml" )
222185 if repo_name :
223186 for repo_entry in repos :
224187 url_match = url_pattern .search (repo_entry )
@@ -291,7 +254,7 @@ def test(
291254 """
292255 Run tests for Django fork and third-party libraries.
293256 """
294- repos , url_pattern , branch_pattern , upstream_pattern = get_repos ("pyproject.toml" )
257+ repos , url_pattern , branch_pattern = get_repos ("pyproject.toml" )
295258 if repo_name :
296259 # Show test settings
297260 if show :
0 commit comments