Skip to content

Enrich incremental blame output #411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 19, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Drop dependency on six
  • Loading branch information
nvie committed Apr 14, 2016
commit 6964e3efc4ac779d458733a05c9d71be2194b2ba
7 changes: 4 additions & 3 deletions git/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# flake8: noqa

import sys
import six

from gitdb.utils.compat import (
PY3,
Expand All @@ -34,6 +33,7 @@ def bchr(n):
return bytes([n])
def mviter(d):
return d.values()
range = xrange
unicode = str
else:
FileType = file
Expand All @@ -44,6 +44,7 @@ def mviter(d):
byte_ord = ord
bchr = chr
unicode = unicode
range = xrange
def mviter(d):
return d.itervalues()

Expand All @@ -52,9 +53,9 @@ def mviter(d):

def safe_decode(s):
"""Safely decodes a binary string to unicode"""
if isinstance(s, six.text_type):
if isinstance(s, unicode):
return s
elif isinstance(s, six.binary_type):
elif isinstance(s, bytes):
if PRE_PY27:
return s.decode(defenc) # we're screwed
else:
Expand Down
2 changes: 1 addition & 1 deletion git/repo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@
defenc,
PY3,
safe_decode,
range,
)

import os
import sys
import re
from six.moves import range

DefaultDBType = GitCmdObjectDB
if sys.version_info[:2] < (2, 5): # python 2.4 compatiblity
Expand Down