diff options
| -rw-r--r-- | git/objects/util.py | 4 | ||||
| -rw-r--r-- | git/remote.py | 24 | ||||
| -rw-r--r-- | git/test/lib/helper.py | 2 | ||||
| -rw-r--r-- | git/test/performance/__init__.py | 1 | ||||
| -rw-r--r-- | git/test/performance/lib.py | 4 | ||||
| -rw-r--r-- | git/test/test_index.py | 2 | 
6 files changed, 19 insertions, 18 deletions
diff --git a/git/objects/util.py b/git/objects/util.py index 35073971..76a24a6f 100644 --- a/git/objects/util.py +++ b/git/objects/util.py @@ -157,8 +157,8 @@ def parse_date(string_date):                  try:                      dtstruct = time.strptime(date_part, fmt)                      utctime = calendar.timegm((dtstruct.tm_year, dtstruct.tm_mon, dtstruct.tm_mday, -                                                tstruct.tm_hour, tstruct.tm_min, tstruct.tm_sec, -                                                dtstruct.tm_wday, dtstruct.tm_yday, tstruct.tm_isdst)) +                                               tstruct.tm_hour, tstruct.tm_min, tstruct.tm_sec, +                                               dtstruct.tm_wday, dtstruct.tm_yday, tstruct.tm_isdst))                      return int(utctime), offset                  except ValueError:                      continue diff --git a/git/remote.py b/git/remote.py index bf0a0021..4742111a 100644 --- a/git/remote.py +++ b/git/remote.py @@ -100,12 +100,12 @@ class PushInfo(object):      NEW_TAG, NEW_HEAD, NO_MATCH, REJECTED, REMOTE_REJECTED, REMOTE_FAILURE, DELETED, \          FORCED_UPDATE, FAST_FORWARD, UP_TO_DATE, ERROR = [1 << x for x in range(11)] -    _flag_map = {'X': NO_MATCH,  -                 '-': DELETED,  +    _flag_map = {'X': NO_MATCH, +                 '-': DELETED,                   '*': 0, -                 '+': FORCED_UPDATE,  +                 '+': FORCED_UPDATE,                   ' ': FAST_FORWARD, -                 '=': UP_TO_DATE,  +                 '=': UP_TO_DATE,                   '!': ERROR}      def __init__(self, flags, local_ref, remote_ref_string, remote, old_commit=None, @@ -208,11 +208,11 @@ class FetchInfo(object):      #                             %c    %-*s %-*s             -> %s       (%s)      re_fetch_result = re.compile("^\s*(.) (\[?[\w\s\.]+\]?)\s+(.+) -> ([/\w_\+\.\-#]+)(    \(.*\)?$)?") -    _flag_map = {'!': ERROR,  -                 '+': FORCED_UPDATE,  -                 '-': TAG_UPDATE,  +    _flag_map = {'!': ERROR, +                 '+': FORCED_UPDATE, +                 '-': TAG_UPDATE,                   '*': 0, -                 '=': HEAD_UPTODATE,  +                 '=': HEAD_UPTODATE,                   ' ': FAST_FORWARD}      def __init__(self, ref, flags, note='', old_commit=None): @@ -526,8 +526,8 @@ class Remote(LazyMixin, Iterable):          # this also waits for the command to finish          # Skip some progress lines that don't provide relevant information          fetch_info_lines = list() -        # Basically we want all fetch info lines which appear to be in regular form, and thus have a  -        # command character. Everything else we ignore,  +        # Basically we want all fetch info lines which appear to be in regular form, and thus have a +        # command character. Everything else we ignore,          cmds = set(PushInfo._flag_map.keys()) & set(FetchInfo._flag_map.keys())          for line in digest_process_messages(proc.stderr, progress):              if line.startswith('fatal:'): @@ -547,8 +547,8 @@ class Remote(LazyMixin, Iterable):          fp.close()          # NOTE: We assume to fetch at least enough progress lines to allow matching each fetch head line with it. -        assert len(fetch_info_lines) >= len(fetch_head_info), "len(%s) <= len(%s)" % (fetch_head_info,  -            fetch_info_lines) +        assert len(fetch_info_lines) >= len(fetch_head_info), "len(%s) <= len(%s)" % (fetch_head_info, +                                                                                      fetch_info_lines)          output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line)                        for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info)) diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py index df94abde..341f5789 100644 --- a/git/test/lib/helper.py +++ b/git/test/lib/helper.py @@ -196,7 +196,7 @@ def with_rw_and_rw_remote_repo(working_tree_ref):                  time.sleep(0.5)              except Exception as err:                  gd = None -            # end  +            # end              # try to list remotes to diagnoes whether the server is up              try: diff --git a/git/test/performance/__init__.py b/git/test/performance/__init__.py index 8b137891..e69de29b 100644 --- a/git/test/performance/__init__.py +++ b/git/test/performance/__init__.py @@ -1 +0,0 @@ - diff --git a/git/test/performance/lib.py b/git/test/performance/lib.py index 9b6f45bf..e92e2b2d 100644 --- a/git/test/performance/lib.py +++ b/git/test/performance/lib.py @@ -49,12 +49,14 @@ class TestBigRepoR(TestBase):          repo_path = os.environ.get(k_env_git_repo)          if repo_path is None: -            logging.info("You can set the %s environment variable to a .git repository of your choice - defaulting to the gitpython repository", k_env_git_repo) +            logging.info( +                "You can set the %s environment variable to a .git repository of your choice - defaulting to the gitpython repository", k_env_git_repo)              repo_path = os.path.dirname(__file__)          # end set some repo path          self.gitrorepo = Repo(repo_path, odbt=GitCmdObjectDB)          self.puregitrorepo = Repo(repo_path, odbt=GitDB) +  class TestBigRepoRW(TestBigRepoR):      """As above, but provides a big repository that we can write to. diff --git a/git/test/test_index.py b/git/test/test_index.py index 5431df44..3f85ea90 100644 --- a/git/test/test_index.py +++ b/git/test/test_index.py @@ -216,7 +216,7 @@ class TestIndex(TestBase):          # if missing objects are okay, this would work though ( they are always okay now )          # As we can't read back the tree with NULL_SHA, we rather set it to something else -        index.entries[manifest_key] = IndexEntry(manifest_entry[:1] + (hex_to_bin('f'*40),) + manifest_entry[2:]) +        index.entries[manifest_key] = IndexEntry(manifest_entry[:1] + (hex_to_bin('f' * 40),) + manifest_entry[2:])          tree = index.write_tree()          # now make a proper three way merge with unmerged entries  | 
