Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script hangs in some repos #20

Open
Falenos opened this issue Sep 26, 2020 · 0 comments
Open

Script hangs in some repos #20

Falenos opened this issue Sep 26, 2020 · 0 comments

Comments

@Falenos
Copy link

Falenos commented Sep 26, 2020

I already managed to run the script for some repos, but in hangs on others.
Debugged a bit and checked out till the first version, but the same thing happens.
Something else I noticed is that these repos had the .git/branches dir empty, not sure if it's relevant.
I can see this, when i stop the script manually
Starting ^CTraceback (most recent call last): File "run_script.py", line 15, in <module> importer.import_repository() File "/Users/ydrargyros/Projects/Contributions-Importer-For-Github/git_contributions_importer/Importer.py", line 74, in import_repository for c in self.get_all_commits(last_committed_date): File "/Users/ydrargyros/Projects/Contributions-Importer-For-Github/git_contributions_importer/Importer.py", line 133, in get_all_commits if c.committed_date < ignore_before_date or (self.ignore_before_date != None and c.committed_date < self.ignore_before_date): File "/usr/local/lib/python3.8/site-packages/gitdb/util.py", line 253, in __getattr__ self._set_cache_(attr) File "/usr/local/lib/python3.8/site-packages/git/objects/commit.py", line 143, in _set_cache_ self._deserialize(BytesIO(stream.read())) File "/usr/local/lib/python3.8/site-packages/git/cmd.py", line 446, in read data = self._stream.read(size) KeyboardInterrupt

When i removed the /branches
Starting ^CTraceback (most recent call last): File "run_script.py", line 15, in <module> importer.import_repository() File "/Users/ydrargyros/Projects/Contributions-Importer-For-Github/git_contributions_importer/Importer.py", line 74, in import_repository for c in self.get_all_commits(last_committed_date): File "/Users/ydrargyros/Projects/Contributions-Importer-For-Github/git_contributions_importer/Importer.py", line 133, in get_all_commits if c.committed_date < ignore_before_date or (self.ignore_before_date != None and c.committed_date < self.ignore_before_date): File "/usr/local/lib/python3.8/site-packages/gitdb/util.py", line 253, in __getattr__ self._set_cache_(attr) File "/usr/local/lib/python3.8/site-packages/git/objects/commit.py", line 142, in _set_cache_ _binsha, _typename, self.size, stream = self.repo.odb.stream(self.binsha) File "/usr/local/lib/python3.8/site-packages/git/db.py", line 42, in stream hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(sha)) File "/usr/local/lib/python3.8/site-packages/git/cmd.py", line 1085, in stream_object_data hexsha, typename, size = self.__get_object_header(cmd, ref) File "/usr/local/lib/python3.8/site-packages/git/cmd.py", line 1057, in __get_object_header return self._parse_object_header(cmd.stdout.readline()) KeyboardInterrupt
Thanks for this nice tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant