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

Commit6eb3af2

Browse files
committed
fix(repo): use GitCmdObjectDB by default
This should fix resource leaking issues once and for all.Relatedgitpython-developers#304
1 parent1d768f6 commit6eb3af2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

‎doc/source/changes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ Changelog
55
1.0.2 - Fixes
66
=============
77

8+
* IMPORTANT: Changed default object database of `Repo` objects to `GitComdObjectDB`. The pure-python implementation
9+
used previously usually fails to release its resources (i.e. file handles), which can lead to problems when working
10+
with large repositories.
811
* CRITICAL: fixed incorrect `Commit` object serialization when authored or commit date had timezones which were not
912
divisable by 3600 seconds. This would happen if the timezone was something like `+0530` for instance.
1013
* A list of all additional fixes can be found `on github<https://github.com/gitpython-developers/GitPython/issues?q=milestone%3A%22v1.0.2+-+Fixes%22+is%3Aclosed>`_

‎git/repo/base.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@
3535
add_progress
3636
)
3737

38-
fromgit.dbimport (
39-
GitCmdObjectDB,
40-
GitDB
41-
)
38+
fromgit.dbimportGitCmdObjectDB
4239

4340
fromgitdb.utilimport (
4441
join,
@@ -62,7 +59,7 @@
6259
importsys
6360
importre
6461

65-
DefaultDBType=GitDB
62+
DefaultDBType=GitCmdObjectDB
6663
ifsys.version_info[:2]< (2,5):# python 2.4 compatiblity
6764
DefaultDBType=GitCmdObjectDB
6865
# END handle python 2.4

‎git/test/test_repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def test_rev_parse(self):
657657
assertrev_parse('@{1}')!=head.commit
658658

659659
deftest_repo_odbtype(self):
660-
target_type=GitDB
660+
target_type=GitCmdObjectDB
661661
ifsys.version_info[:2]< (2,5):
662662
target_type=GitCmdObjectDB
663663
assertisinstance(self.rorepo.odb,target_type)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp