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

Commitde3b963

Browse files
committed
Moved test-centric windows specific fix into the class itself to assure this kind of issue doesn't popup for anyone
1 parent258403d commitde3b963

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

‎lib/git/remote.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
join,
2626
)
2727
importre
28+
importos
2829

2930
__all__= ('RemoteProgress','PushInfo','FetchInfo','Remote')
3031

@@ -418,6 +419,16 @@ def __init__(self, repo, name):
418419
self.repo=repo
419420
self.name=name
420421

422+
ifos.name=='nt':
423+
# some oddity: on windows, python 2.5, it for some reason does not realize
424+
# that it has the config_writer property, but instead calls __getattr__
425+
# which will not yield the expected results. 'pinging' the members
426+
# with a dir call creates the config_writer property that we require
427+
# ... bugs like these make me wonder wheter python really wants to be used
428+
# for production. It doesn't happen on linux though.
429+
dir(self)
430+
# END windows special handling
431+
421432
def__getattr__(self,attr):
422433
"""Allows to call this instance like
423434
remote.special( *args, **kwargs) to call git-remote special self.name"""

‎test/testlib/helper.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,6 @@ def remote_repo_creator(self):
188188
d_remote.fetch()
189189
remote_repo_url="git://localhost%s"%remote_repo_dir
190190

191-
# some oddity: on windows, python 2.5, it for some reason does not realize
192-
# that it has the config_writer property, but instead calls __getattr__
193-
# which will not yield the expected results. 'pinging' the members
194-
# with a dir call creates the config_writer property that we require
195-
# ... bugs like these make me wonder wheter python really wants to be used
196-
# for production. It doesn't happen on linux though.
197-
dir(d_remote)
198191
d_remote.config_writer.set('url',remote_repo_url)
199192

200193
# try to list remotes to diagnoes whether the server is up

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp