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

Commita38a005

Browse files
committed
Added imports for standard locking file classes into the git module
1 parent697702e commita38a005

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

‎TODO

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@ Object
3232

3333
Config
3434
------
35-
* Expand .get* methods of GitConfigParser to support default value. If it is not None,
36-
it will be returned instead of raising. This way the class will be much more usable,
37-
and ... I truly hate this config reader as it is so 'old' style. Its not even a new-style
38-
class yet showing that it must be ten years old.
39-
- If you are at it, why not start a new project that reimplements the ConfigWriter
40-
properly, honestly. Tune it for usability ... .
35+
* Cache the config_reader of the repository and check whether they need to
36+
update their information as the local file(s) have changed. Currently
37+
we re-read all configuration data each time a config-reader is created.
38+
In a way this leaves it to the user to actually keep the config-reader for
39+
multiple uses, but there are cases when the user can hardly do that.
4140

4241
Diff
4342
----

‎lib/git/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
fromgit.statsimportStats
2121
fromgit.remoteimport*
2222
fromgit.indeximport*
23+
fromgit.utilsimportLockFile,BlockingLockFile
2324

2425
__all__= [nameforname,objinlocals().items()
2526
ifnot (name.startswith('_')orinspect.ismodule(obj)) ]

‎lib/git/cmd.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ def execute(self, command,
218218

219219
# Wait for the process to return
220220
status=0
221+
stdout_value=''
222+
stderr_value=''
221223
try:
222224
ifoutput_streamisNone:
223225
stdout_value=proc.stdout.read().rstrip()# strip trailing "\n"
@@ -232,6 +234,7 @@ def execute(self, command,
232234
stdout_value=output_stream
233235
# END stdout handling
234236
stderr_value=proc.stderr.read().rstrip()# strip trailing "\n"
237+
235238
# waiting here should do nothing as we have finished stream reading
236239
status=proc.wait()
237240
finally:

‎lib/git/index.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
fromerrorsimportGitCommandError
2323
fromgit.objectsimportBlob,Tree,Object,Commit
24-
fromgit.utilsimportSHA1Writer,LazyMixin,ConcurrentWriteOperation,join_path_native,BlockingLockFile
24+
fromgit.utilsimportSHA1Writer,LazyMixin,ConcurrentWriteOperation,join_path_native
2525

2626

2727
classCheckoutError(Exception ):
@@ -914,6 +914,7 @@ def add(self, items, force=True, fprogress=lambda *args: None):
914914
entries_added=list()
915915
paths,entries=self._preprocess_add_items(items)
916916

917+
917918
# HANDLE PATHS
918919
ifpaths:
919920
# to get suitable progress information, pipe paths to stdin

‎lib/git/remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(self, config, section):
2929

3030
def__getattr__(self,attr):
3131
ifattrinself._valid_attrs_:
32-
returnlambda*args:self._call_config(attr,*args)
32+
returnlambda*args,**kwargs:self._call_config(attr,*args,**kwargs)
3333
returnsuper(_SectionConstraint,self).__getattribute__(attr)
3434

3535
def_call_config(self,method,*args,**kwargs):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp