10
10
get_management_command ,
11
11
get_repos ,
12
12
repo_clone ,
13
- repo_fetch ,
14
13
repo_install ,
15
14
repo_status ,
16
15
repo_update ,
@@ -45,7 +44,7 @@ def repo(ctx, list_repos):
45
44
Run Django fork and third-party library tests.
46
45
"""
47
46
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" )
49
48
if list_repos :
50
49
for repo_entry in repos :
51
50
click .echo (repo_entry )
@@ -70,7 +69,7 @@ def repo(ctx, list_repos):
70
69
@pass_repo
71
70
def clone (repo , ctx , repo_names , all_repos , install ):
72
71
"""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" )
74
73
75
74
if repo_names :
76
75
for repo_name in repo_names :
@@ -123,9 +122,7 @@ def install(repo, ctx, repo_names, all_repos):
123
122
return
124
123
125
124
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" )
129
126
for repo_entry in repos :
130
127
url_match = url_pattern .search (repo_entry )
131
128
if url_match :
@@ -140,40 +137,6 @@ def install(repo, ctx, repo_names, all_repos):
140
137
click .echo (ctx .get_help ())
141
138
142
139
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
-
177
140
@repo .command ()
178
141
@click .argument ("repo_names" , nargs = - 1 )
179
142
@click .option (
@@ -218,7 +181,7 @@ def makemigrations(
218
181
):
219
182
"""Run `makemigrations` for cloned repositories."""
220
183
221
- repos , url_pattern , branch_pattern , upstream_pattern = get_repos ("pyproject.toml" )
184
+ repos , url_pattern , branch_pattern = get_repos ("pyproject.toml" )
222
185
if repo_name :
223
186
for repo_entry in repos :
224
187
url_match = url_pattern .search (repo_entry )
@@ -291,7 +254,7 @@ def test(
291
254
"""
292
255
Run tests for Django fork and third-party libraries.
293
256
"""
294
- repos , url_pattern , branch_pattern , upstream_pattern = get_repos ("pyproject.toml" )
257
+ repos , url_pattern , branch_pattern = get_repos ("pyproject.toml" )
295
258
if repo_name :
296
259
# Show test settings
297
260
if show :
0 commit comments