| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,6 @@ | |||
| 20 | 20 | ) | |
| 21 | 21 | from .exc import GitCommandError | |
| 22 | 22 | from git.compat import ( | |
| 23 | - text_type, | ||
| 24 | 23 | string_types, | |
| 25 | 24 | defenc, | |
| 26 | 25 | PY3 | |
@@ -400,7 +399,8 @@ def execute(self, command, | |||
| 400 | 399 | if self.GIT_PYTHON_TRACE == 'full': | |
| 401 | 400 | cmdstr = " ".join(command) | |
| 402 | 401 | if stderr_value: | |
| 403 | - log.info("%s -> %d; stdout: '%s'; stderr: '%s'", cmdstr, status, stdout_value.decode(defenc), stderr_value.decode(defenc)) | ||
| 402 | + log.info("%s -> %d; stdout: '%s'; stderr: '%s'", | ||
| 403 | + cmdstr, status, stdout_value.decode(defenc), stderr_value.decode(defenc)) | ||
| 404 | 404 | elif stdout_value: | |
| 405 | 405 | log.info("%s -> %d; stdout: '%s'", cmdstr, status, stdout_value.decode(defenc)) | |
| 406 | 406 | else: | |
@@ -413,8 +413,7 @@ def execute(self, command, | |||
| 413 | 413 | else: | |
| 414 | 414 | raise GitCommandError(command, status, stderr_value) | |
| 415 | 415 | ||
| 416 | - | ||
| 417 | - if isinstance(stdout_value, bytes): # could also be output_stream | ||
| 416 | + if isinstance(stdout_value, bytes): # could also be output_stream | ||
| 418 | 417 | stdout_value = stdout_value.decode(defenc) | |
| 419 | 418 | ||
| 420 | 419 | # Allow access to the command's status code | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -178,7 +178,7 @@ def __init__(self, file_or_files, read_only=True): | |||
| 178 | 178 | # Used in python 3, needs to stay in sync with sections for underlying implementation to work | |
| 179 | 179 | if not hasattr(self, '_proxies'): | |
| 180 | 180 | self._proxies = self._dict() | |
| 181 | - | ||
| 181 | + | ||
| 182 | 182 | self._file_or_files = file_or_files | |
| 183 | 183 | self._read_only = read_only | |
| 184 | 184 | self._is_initialized = False | |
@@ -206,7 +206,7 @@ def __del__(self): | |||
| 206 | 206 | ||
| 207 | 207 | def release(self): | |
| 208 | 208 | """Flush changes and release the configuration write lock. This instance must not be used anymore afterwards. | |
| 209 | - In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called | ||
| 209 | + In Python 3, it's required to explicitly release locks and flush changes, as __del__ is not called | ||
| 210 | 210 | deterministically anymore.""" | |
| 211 | 211 | # checking for the lock here makes sure we do not raise during write() | |
| 212 | 212 | # in case an invalid parser was created who could not get a lock | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -382,14 +382,14 @@ def _serialize(self, stream): | |||
| 382 | 382 | c = self.committer | |
| 383 | 383 | fmt = "%s %s <%s> %s %s\n" | |
| 384 | 384 | write((fmt % ("author", aname, a.email, | |
| 385 | - self.authored_date, | ||
| 386 | - altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding)) | ||
| 385 | + self.authored_date, | ||
| 386 | + altz_to_utctz_str(self.author_tz_offset))).encode(self.encoding)) | ||
| 387 | 387 | ||
| 388 | 388 | # encode committer | |
| 389 | 389 | aname = c.name | |
| 390 | 390 | write((fmt % ("committer", aname, c.email, | |
| 391 | - self.committed_date, | ||
| 392 | - altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding)) | ||
| 391 | + self.committed_date, | ||
| 392 | + altz_to_utctz_str(self.committer_tz_offset))).encode(self.encoding)) | ||
| 393 | 393 | ||
| 394 | 394 | if self.encoding != self.default_encoding: | |
| 395 | 395 | write(("encoding %s\n" % self.encoding).encode('ascii')) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,6 +40,7 @@ def tree_to_stream(entries, write): | |||
| 40 | 40 | write(b''.join((mode_str, b' ', name, b'\0', binsha))) | |
| 41 | 41 | # END for each item | |
| 42 | 42 | ||
| 43 | + | ||
| 43 | 44 | def tree_entries_from_data(data): | |
| 44 | 45 | """Reads the binary representation of a tree and returns tuples of Tree items | |
| 45 | 46 | :param data: data block with tree data (as bytes) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -256,7 +256,7 @@ def append_entry(cls, config_reader, filepath, oldbinsha, newbinsha, message): | |||
| 256 | 256 | committer = isinstance(config_reader, Actor) and config_reader or Actor.committer(config_reader) | |
| 257 | 257 | entry = RefLogEntry(( | |
| 258 | 258 | bin_to_hex(oldbinsha).decode('ascii'), | |
| 259 | - bin_to_hex(newbinsha).decode('ascii'), | ||
| 259 | + bin_to_hex(newbinsha).decode('ascii'), | ||
| 260 | 260 | committer, (int(time.time()), time.altzone), message | |
| 261 | 261 | )) | |
| 262 | 262 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -144,7 +144,7 @@ def _get_ref_info(cls, repo, ref_path): | |||
| 144 | 144 | for sha, path in cls._iter_packed_refs(repo): | |
| 145 | 145 | if path != ref_path: | |
| 146 | 146 | continue | |
| 147 | - # sha will be used as | ||
| 147 | + # sha will be used | ||
| 148 | 148 | tokens = sha, path | |
| 149 | 149 | break | |
| 150 | 150 | # END for each packed ref | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,7 +15,6 @@ | |||
| 15 | 15 | from git.test.test_commit import assert_commit_serialization | |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | - | ||
| 19 | 18 | class TestPerformance(TestBigRepoRW): | |
| 20 | 19 | ||
| 21 | 20 | # ref with about 100 commits in its history | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,6 @@ | |||
| 19 | 19 | Actor, | |
| 20 | 20 | ) | |
| 21 | 21 | from gitdb import IStream | |
| 22 | - from gitdb.util import hex_to_bin | ||
| 23 | 22 | from git.compat import ( | |
| 24 | 23 | string_types, | |
| 25 | 24 | text_type | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,7 @@ | |||
| 18 | 18 | from copy import copy | |
| 19 | 19 | from git.config import cp | |
| 20 | 20 | ||
| 21 | + | ||
| 21 | 22 | class TestBase(TestCase): | |
| 22 | 23 | ||
| 23 | 24 | def _to_memcache(self, file_path): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,7 @@ | |||
| 12 | 12 | from git import Stats | |
| 13 | 13 | from git.compat import defenc | |
| 14 | 14 | ||
| 15 | + | ||
| 15 | 16 | class TestStats(TestBase): | |
| 16 | 17 | ||
| 17 | 18 | def test_list_from_string(self): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments