@@ -137,6 +137,8 @@ def repo_clone(repo_entry, url_pattern, branch_pattern, repo):
137137
138138
139139def repo_install (clone_path ):
140+ if clone_path .endswith ("mongo-arrow" ):
141+ clone_path = os .path .join (clone_path , "bindings" , "python" )
140142 if os .path .exists (os .path .join (clone_path , "pyproject.toml" )):
141143 subprocess .run ([sys .executable , "-m" , "pip" , "install" , "-e" , clone_path ])
142144 elif os .path .exists (os .path .join (clone_path , "setup.py" )):
@@ -177,7 +179,7 @@ def repo_update(repo_entry, url_pattern, repo):
177179 click .echo (f"Skipping { repo_name } : Repository not found at { clone_path } " )
178180
179181
180- def repo_status (repo_entry , url_pattern , repo , reset = False ):
182+ def repo_status (repo_entry , url_pattern , repo , reset = False , diff = False ):
181183 """Helper function to update a single repository."""
182184 url_match = url_pattern .search (repo_entry )
183185 if not url_match :
@@ -190,25 +192,29 @@ def repo_status(repo_entry, url_pattern, repo, reset=False):
190192 if os .path .exists (clone_path ):
191193 try :
192194 repo = git .Repo (clone_path )
193- click .echo (click . style ( f"Status for { repo_name } :" , fg = "blue" ) )
195+ click .echo (f"=== { repo_name } ===" )
194196 if reset :
195197 click .echo (click .style (repo .git .reset ("--hard" ), fg = "blue" ))
196198 else :
197- click .echo ()
199+ click .echo ("Remote URLs:" )
198200 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+ ),
205204 )
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" ))
211212 except git .exc .NoSuchPathError :
212213 click .echo ("Not a valid Git repository." )
213214 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