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

Commite40ad63

Browse files
committed
Fixed PY3 support.
Apparently, thanks to an incorrect version check, PY3 ended up usinga git command object database by default. This is now fixed.Additionally, the update_cache code was adjusted to check for method-existence,as it's valid to use object databases which simply don't have acaching mechanism (like the git command object database)
1 parent46889d1 commite40ad63

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

‎git/remote.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,8 @@ def fetch(self, refspec=None, progress=None, **kwargs):
611611

612612
proc=self.repo.git.fetch(self,*args,with_extended_output=True,as_process=True,v=True,**kwargs)
613613
res=self._get_fetch_info_from_stderr(proc,progressorRemoteProgress())
614-
self.repo.odb.update_cache()
614+
ifhasattr(self.repo.odb,'update_cache'):
615+
self.repo.odb.update_cache()
615616
returnres
616617

617618
defpull(self,refspec=None,progress=None,**kwargs):
@@ -625,7 +626,8 @@ def pull(self, refspec=None, progress=None, **kwargs):
625626
kwargs=add_progress(kwargs,self.repo.git,progress)
626627
proc=self.repo.git.pull(self,refspec,with_extended_output=True,as_process=True,v=True,**kwargs)
627628
res=self._get_fetch_info_from_stderr(proc,progressorRemoteProgress())
628-
self.repo.odb.update_cache()
629+
ifhasattr(self.repo.odb,'update_cache'):
630+
self.repo.odb.update_cache()
629631
returnres
630632

631633
defpush(self,refspec=None,progress=None,**kwargs):

‎git/repo/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
importre
6060

6161
DefaultDBType=GitDB
62-
ifsys.version_info[1]<5:# python 2.4 compatiblity
62+
ifsys.version_info[:2]<(2,5):# python 2.4 compatiblity
6363
DefaultDBType=GitCmdObjectDB
6464
# END handle python 2.4
6565

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp