@@ -137,6 +137,8 @@ def repo_clone(repo_entry, url_pattern, branch_pattern, repo):
137
137
138
138
139
139
def repo_install (clone_path ):
140
+ if clone_path .endswith ("mongo-arrow" ):
141
+ clone_path = os .path .join (clone_path , "bindings" , "python" )
140
142
if os .path .exists (os .path .join (clone_path , "pyproject.toml" )):
141
143
subprocess .run ([sys .executable , "-m" , "pip" , "install" , "-e" , clone_path ])
142
144
elif os .path .exists (os .path .join (clone_path , "setup.py" )):
@@ -177,7 +179,7 @@ def repo_update(repo_entry, url_pattern, repo):
177
179
click .echo (f"Skipping { repo_name } : Repository not found at { clone_path } " )
178
180
179
181
180
- def repo_status (repo_entry , url_pattern , repo , reset = False ):
182
+ def repo_status (repo_entry , url_pattern , repo , reset = False , diff = False ):
181
183
"""Helper function to update a single repository."""
182
184
url_match = url_pattern .search (repo_entry )
183
185
if not url_match :
@@ -190,25 +192,29 @@ def repo_status(repo_entry, url_pattern, repo, reset=False):
190
192
if os .path .exists (clone_path ):
191
193
try :
192
194
repo = git .Repo (clone_path )
193
- click .echo (click . style ( f"Status for { repo_name } :" , fg = "blue" ) )
195
+ click .echo (f"=== { repo_name } ===" )
194
196
if reset :
195
197
click .echo (click .style (repo .git .reset ("--hard" ), fg = "blue" ))
196
198
else :
197
- click .echo ()
199
+ click .echo ("Remote URLs:" )
198
200
click .echo (
199
- click .style (
200
- "" .join (
201
- [f"{ remote .name } :{ remote .url } " for remote in repo .remotes ]
202
- ),
203
- fg = "blue" ,
204
- )
201
+ "" .join (
202
+ [f"- { remote .name } :{ remote .url } " for remote in repo .remotes ]
203
+ ),
205
204
)
206
- click .echo ()
207
- click .echo (click .style (repo .git .status (), fg = "blue" ))
208
- click .echo ()
209
- click .echo ()
210
- click .echo ()
205
+ click .echo (repo .git .status ())
206
+ if diff :
207
+ diff_output = repo .git .diff ()
208
+ if diff_output :
209
+ click .echo (click .style (diff_output , fg = "red" ))
210
+ else :
211
+ click .echo (click .style ("No diff output" , fg = "yellow" ))
211
212
except git .exc .NoSuchPathError :
212
213
click .echo ("Not a valid Git repository." )
213
214
else :
214
- click .echo (f"Skipping { repo_name } : Repository not found at { clone_path } " )
215
+ click .echo (
216
+ click .style (
217
+ f"Skipping { repo_name } : Repository not found at { clone_path } " ,
218
+ fg = "yellow" ,
219
+ )
220
+ )
0 commit comments