Merged
Conversation
Contributor
Utopia-qwerty
commented
Mar 18, 2026
- 测试截图如下
added 2 commits
March 18, 2026 22:17
There was a problem hiding this comment.
Pull request overview
该 PR 旨在改进 Util/download_from_git.py 下载器:在拉取大文件仓库(含 Git LFS 对象)时提供更友好的下载过程展示,并在文件切分/合并/解压阶段增加控制台进度显示,以提升可用性与可观测性。
Changes:
- 将仓库克隆流程改为通过
subprocess调用git clone,并新增 Git LFS 初始化与拉取逻辑。 - 新增通用
show_progress_bar(),在切分.zip为.dat、合并.dat、删除.dat、解压.zip等环节显示进度条。 - 调整若干路径/字符串风格与注释格式,增强脚本输出信息。
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+125
to
+136
| # 先用 --no-checkout 克隆,避免因LFS未初始化而失败 | ||
| clone_cmd = [ | ||
| git_exe, | ||
| "clone", | ||
| "--depth", | ||
| "1", | ||
| "-b", | ||
| branch, | ||
| "--no-checkout", | ||
| repo_url, | ||
| self.local_path, | ||
| ] |
Comment on lines
+141
to
+146
| stderr=subprocess.DEVNULL, | ||
| ) | ||
| if result.returncode != 0: | ||
| raise Exception( | ||
| f"Git clone failed with return code {result.returncode}" | ||
| ) |
Comment on lines
+317
to
+319
| files = sorted( | ||
| [f for f in files if f.endswith(".dat")], | ||
| key=lambda x: int(x.split("_")[1].split(".")[0]), |
Comment on lines
+400
to
+402
| if os.path.exists(os.path.join(local_path, latest_file)): | ||
| os.rename( | ||
| os.path.join(local_path, latest_file), |
Comment on lines
+405
to
+408
| if os.path.exists(os.path.join(rep_path, "*.dat")) is False: | ||
| split_file( | ||
| os.path.join(local_path, "hutb.zip"), rep_path, 256 * 1024 * 1024 | ||
| ) # 每个小文件最大为 256MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.