Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to display the progress of the download (clone_from) ?#1134

AnsweredbyByron
qcha41 asked this question inQ&A
Discussion options

Hello,

I am a new GitPython user and I would like to display a progress bar when cloning locally a large GitHub repository. To begin with, I have created a RemoteProgress based class and I have plugged it in the clone_from() function :

fromgitimportRepofromgit.remoteimportRemoteProgressclassProgress(RemoteProgress):defupdate(self,*args):print(self._cur_line)Repo.clone_from(github_url,local_path,progress=Progress())

When I run it, I have well the progress from 0 to 100% ofremote: Counting objects: andremote: Compressing objects: steps (which are super fast) but after that, nothing more : the terminal keep freezed until the end of the download.

How to catch the progress of the download itself ?

Thank you in advance!

You must be logged in to vote

From what I could gatherin the docs this is essentially what needs to be done, and that should include local progress (indexing, resolving) along with remote progress.

Maybe for some reason progress cannot be parsed, maybe overrideline_dropped(self, line) to learn about lines that couldn't be parsed.

Nonetheless, I would also expect that to work in a more straightforward fashion, maybe we can figure that out here.

Replies: 2 comments

Comment options

From what I could gatherin the docs this is essentially what needs to be done, and that should include local progress (indexing, resolving) along with remote progress.

Maybe for some reason progress cannot be parsed, maybe overrideline_dropped(self, line) to learn about lines that couldn't be parsed.

Nonetheless, I would also expect that to work in a more straightforward fashion, maybe we can figure that out here.

You must be logged in to vote
0 replies
Answer selected byByron
Comment options

Looks like similar problem...https://stackoverflow.com/questions/51045540/python-progress-bar-for-git-clone

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
3 participants
@qcha41@Byron@emcek
Converted from issue

This discussion was converted from issue #1059 on February 26, 2021 11:13.


[8]ページ先頭

©2009-2025 Movatter.jp