summaryrefslogtreecommitdiff
path: root/git/compat.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove and replace compat.text_typeHarmon2020-02-081-1/+0
|
* Remove and replace compat.string_typesHarmon2020-02-081-1/+0
|
* Remove and replace compat.izipHarmon2020-02-081-3/+0
|
* Remove and replace compat.MAXSIZEHarmon2020-02-081-1/+0
|
* Remove compat.PY3Harmon2020-02-081-1/+0
|
* Remove checks for Python 2 and/or 3Harmon2020-02-081-4/+0
|
* Remove and replace compat.UnicodeMixinHarmon2020-02-081-14/+0
|
* Remove surrogateescape error handler for Python 2Harmon2020-02-081-179/+0
|
* Remove and replace compat.bytes_chrHarmon2020-02-081-8/+3
|
* Remove and replace compat._unichrHarmon2020-02-081-6/+4
|
* Remove and replace compat.binary_typeHarmon2020-02-081-5/+0
|
* Remove Python 2 check for compat.defencHarmon2020-02-081-2/+0
|
* Remove and replace compat.unicodeHarmon2020-02-081-5/+3
|
* Remove and replace compat.xrangeHarmon2020-02-081-1/+0
|
* Remove compat.rangeHarmon2020-02-081-2/+0
|
* Remove and replace compat.mviterHarmon2020-02-081-6/+0
|
* Remove and replace compat.bchrHarmon2020-02-081-4/+0
|
* Remove compat.byte_ordHarmon2020-02-081-4/+0
|
* Remove and replace compat.FileTypeHarmon2020-02-081-6/+0
|
* Remove unnecessary check for sys.getfilesystemencodingHarmon2020-02-081-4/+1
|
* removed Unnecessary “else” after “return”Pratik Anurag2019-10-151-6/+3
|
* Drop python 2 support, again (revert previous revert)Sebastian Thiel2019-08-111-1/+4
| | | | This reverts commit 913d806f02cf50250d230f88b897350581f80f6b.
* Revert "Drop python 2.7 support and help with encodings"Sebastian Thiel2019-07-291-4/+1
| | | | This reverts commit dac619e4917b0ad43d836a534633d68a871aecca.
* Drop python 2.7 support and help with encodingsSebastian Thiel2019-07-201-1/+4
| | | | Fixes #312
* Revert "This time, use test-requirements."Sebastian Thiel2019-07-201-4/+1
| | | | | | This reverts commit 74a0507f4eb468b842d1f644f0e43196cda290a1. https://travis-ci.org/gitpython-developers/GitPython/jobs/561334516#L634
* This time, use test-requirements.Sebastian Thiel2019-07-201-1/+4
|
* Revert "Merge branch 'PR-non-ascii-filenames' of ↵Sebastian Thiel2019-07-201-4/+1
| | | | | | | | | | https://github.com/xarx00/GitPython into xarx00-PR-non-ascii-filenames" This reverts commit 3b13c115994461fb6bafe5dd06490aae020568c1, reversing changes made to da8aeec539da461b2961ca72049df84bf30473e1. It doesn't pass, unfortunately. Is it a travis issue? https://travis-ci.org/gitpython-developers/GitPython/jobs/561333763#L340
* added support for non-ascii directories and file namesxarx002019-04-051-1/+4
|
* RF: primarily flake8 lints + minor RF to reduce duplication in PATHEXTYaroslav Halchenko2017-11-271-1/+1
| | | | | I did keep some "bare" except with catch all Exception: , while tried to disable flake8 complaints where clearly all exceptions are to be catched
* BF: pass original exception into replace_surrogate_encodeYaroslav Halchenko2017-03-081-3/+3
| | | | Fixes my incorrect fix in #598
* BF: there is no exc variable, raising NotASurrogateError if that is the ↵Yaroslav Halchenko2017-03-011-1/+1
| | | | right thing todo
* fix(surrogateescape): enable on py2, fix testsSebastian Thiel2016-10-161-1/+1
|
* fix(unicode): use surrogateescape in bytes.decodeSebastian Thiel2016-10-161-1/+191
| | | | | | | | | | | | | | That way, we will try to decode as default encoding (usually utf-8), but allow ourselves to simply keep bytes that don't match within the resulting unicode string. That way, we allow for lossless decode/encode cycles while still assuring that decoding never fails. NOTE: I was too lazy to create a test that would verify it, but manually executed https://github.com/petertodd/gitpython-unicode-error. fixes #532
* src: No PyDev warningsKostis Anagnostopoulos2016-10-041-9/+14
| | | | | | | | + Mark all unused vars and other non-pep8 (PyDev) warnings + test_utils: + enable & fix forgotten IterableList looped path. + unittestize all assertions. + remote: minor fix progress dispatching unknown err-lines
* Win, #519: FIX repo TCs.Kostis Anagnostopoulos2016-10-011-1/+12
| | | | | | | | | | | | | | | + FIX TestRepo.test_submodule_update(): + submod: del `.git` file prior overwrite; Windows denied otherwise! + FIX TestRepo.test_untracked_files(): + In the `git add <file>` case, it failed with unicode args on PY2. Had to encode them with `locale.getpreferredencoding()` AND use SHELL. + cmd: add `shell` into `execute()` kwds, for overriding USE_SHELL per command. + repo: replace blocky `communicate()` in `_clone()` with thread-pumps. + test_repo.py: unittestize (almost all) assertions. + Replace open --> with open for index (base and TC). + test_index.py: Enabled a dormant assertion.
* FIX hook TC on PY3+Win & indeterministic lock timing.Kostis Anagnostopoulos2016-09-291-0/+10
| | | | | | | | | + Cannot `index.path` into ENV, it is bytes! + The hook TC never runs on linux! + Unblock removal of odbfile in perf-large streams TC. + Attempt to unblock removal of submodule file by intensive cleaning. more unblock files
* Win, hook, #519: Consume Hook Popen-proc out of GILKostis Anagnostopoulos2016-09-281-1/+2
| | | | | | | | + HookException thrown on Popen, and were missed on Windows. + No SHELL on Popen?? + Minor fixes: + Try harder to delete trees - no remorses. + Simplify exception reprs. + Unittest-ize test_index assertions.
* Win, #519: Ensure fixtures & bashscript checked-out eol=lfKostis Anagnostopoulos2016-09-281-2/+2
| | | | + FIX all Diff TCs.
* src: constify is_<platform>() callsKostis Anagnostopoulos2016-09-281-11/+3
| | | + TCs: unittest-asserts for git-tests.
* 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
|