summaryrefslogtreecommitdiff
path: root/git/compat.py
Commit message (Collapse)AuthorAgeFilesLines
...
* PY2, #519: FIX GitCommandError.tostr() encoding issueKostis Anagnostopoulos2016-09-281-6/+15
| | | | + PY3 means "PY3 or later" (TODO: fix also for *gitdb* project).
* src, #519: collect all is_<platform>() callsKostis Anagnostopoulos2016-09-271-0/+14
|
* Store raw path bytes in Diff instanceskeep-raw-bytes-on-diffsVincent Driessen2016-06-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the following fields on Diff instances were assumed to be passed in as unicode strings: - `a_path` - `b_path` - `rename_from` - `rename_to` However, since Git natively records paths as bytes, these may potentially not have a valid unicode representation. This patch changes the Diff instance to instead take the following equivalent fields that should be raw bytes instead: - `a_rawpath` - `b_rawpath` - `raw_rename_from` - `raw_rename_to` NOTE ON BACKWARD COMPATIBILITY: The original `a_path`, `b_path`, etc. fields are still available as properties (rather than slots). These properties now dynamically decode the raw bytes into a unicode string (performing the potentially destructive operation of replacing invalid unicode chars by "�"'s). This means that all code using Diffs should remain backward compatible. The only exception is when people would manually construct Diff instances by calling the constructor directly, in which case they should now pass in bytes rather than unicode strings. See also the discussion on https://github.com/gitpython-developers/GitPython/pull/467
* Python 2.6 compatVincent Driessen2016-06-141-1/+1
|
* Need spaces in Emacs style encoding commentSteven Colby2016-05-181-1/+1
| | | | | Although it's hard to see, PEP-0263 does have ws delimiting the 'coding' string. This commit will fix the root cause of (at least) one bug: https://lists.fedoraproject.org/archives/list/eclipse-sig@lists.fedoraproject.org/thread/5XQ5JRHG6DPPMGRDU7TA2AO4EYS2H7AG/
* Remove Python 2.6 hackVincent Driessen2016-04-191-8/+1
| | | | Since support was dropped.
* Drop dependency on sixVincent Driessen2016-04-141-3/+4
|
* Fix commentVincent Driessen2016-04-141-1/+3
|
* Add incremental blame supportVincent Driessen2016-04-131-0/+15
| | | | | | | | | | | | | | | This adds a sibling method to Repo's blame method: Repo.blame_incremental(rev, path, **kwargs) This can alternatively be called using: Repo.blame(rev, path, incremental=True) The main difference is that blame incremental is a bit more efficient and does not return the full file's contents, just the commits and the line number ranges. The parser is a bit more straight-forward and faster since the incremental output format is defined a little stricter.
* This should fix flake8 on py3Sebastian Thiel2015-01-071-0/+2
| | | | See #177
* test_index worksSebastian Thiel2015-01-061-0/+4
|
* test_fun worksSebastian Thiel2015-01-051-0/+3
|
* Fixes test_blob and improved commit writing/readingSebastian Thiel2015-01-051-1/+3
|
* Intermediate commit: test_config and test_actor worksSebastian Thiel2015-01-051-1/+31
| | | | | Kind of tackling the tasks step by step, picking low-hanging fruit first, or the ones that everyone depends on
* Fixed io types to make tests work on PY2 once again.py3Sebastian Thiel2015-01-051-1/+2
| | | | Now it's about going through PY3 issues
* Dum brute force conversion of all types.Sebastian Thiel2015-01-041-2/+9
| | | | | | However, StringIO really is ByteIO in most cases, and py2.7 should run but doesn't. This should be made work first.
* initial set of adjustments to make (most) imports work.Sebastian Thiel2015-01-041-0/+19
More to come, especially when it's about strings