| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,12 +32,11 @@ Object | |||
| 32 | 32 | ||
| 33 | 33 | Config | |
| 34 | 34 | ------ | |
| 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. | ||
| 41 | 40 | ||
| 42 | 41 | Diff | |
| 43 | 42 | ---- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ | |||
| 20 | 20 | from git.stats import Stats | |
| 21 | 21 | from git.remote import * | |
| 22 | 22 | from git.index import * | |
| 23 | + from git.utils import LockFile, BlockingLockFile | ||
| 23 | 24 | ||
| 24 | 25 | __all__ = [ name for name, obj in locals().items() | |
| 25 | 26 | if not (name.startswith('_') or inspect.ismodule(obj)) ] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -218,6 +218,8 @@ def execute(self, command, | |||
| 218 | 218 | ||
| 219 | 219 | # Wait for the process to return | |
| 220 | 220 | status = 0 | |
| 221 | + stdout_value = '' | ||
| 222 | + stderr_value = '' | ||
| 221 | 223 | try: | |
| 222 | 224 | if output_stream is None: | |
| 223 | 225 | stdout_value = proc.stdout.read().rstrip() # strip trailing "\n" | |
@@ -232,6 +234,7 @@ def execute(self, command, | |||
| 232 | 234 | stdout_value = output_stream | |
| 233 | 235 | # END stdout handling | |
| 234 | 236 | stderr_value = proc.stderr.read().rstrip() # strip trailing "\n" | |
| 237 | + | ||
| 235 | 238 | # waiting here should do nothing as we have finished stream reading | |
| 236 | 239 | status = proc.wait() | |
| 237 | 240 | finally: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,7 +21,7 @@ | |||
| 21 | 21 | ||
| 22 | 22 | from errors import GitCommandError | |
| 23 | 23 | from git.objects import Blob, Tree, Object, Commit | |
| 24 | - from git.utils import SHA1Writer, LazyMixin, ConcurrentWriteOperation, join_path_native, BlockingLockFile | ||
| 24 | + from git.utils import SHA1Writer, LazyMixin, ConcurrentWriteOperation, join_path_native | ||
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | class CheckoutError( Exception ): | |
@@ -914,6 +914,7 @@ def add(self, items, force=True, fprogress=lambda *args: None): | |||
| 914 | 914 | entries_added = list() | |
| 915 | 915 | paths, entries = self._preprocess_add_items(items) | |
| 916 | 916 | ||
| 917 | + | ||
| 917 | 918 | # HANDLE PATHS | |
| 918 | 919 | if paths: | |
| 919 | 920 | # to get suitable progress information, pipe paths to stdin | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ def __init__(self, config, section): | |||
| 29 | 29 | ||
| 30 | 30 | def __getattr__(self, attr): | |
| 31 | 31 | if attr in self._valid_attrs_: | |
| 32 | - return lambda *args: self._call_config(attr, *args) | ||
| 32 | + return lambda *args, **kwargs: self._call_config(attr, *args, **kwargs) | ||
| 33 | 33 | return super(_SectionConstraint,self).__getattribute__(attr) | |
| 34 | 34 | ||
| 35 | 35 | def _call_config(self, method, *args, **kwargs): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments