aboutsummaryrefslogtreecommitdiff
path: root/git/objects
AgeCommit message (Collapse)Author
2017-09-19BF: use get, not casting get_value while dealing with submodule path/url etcYaroslav Halchenko
2017-03-09Spelling fixesVille Skyttä
2017-02-02Fix git.Commit docs typoReuben Sutton
2016-12-08Merge pull request #541 from andy-maier/py26_fixesSebastian Thiel
Fixes to support Python 2.6 again.
2016-12-08chore(lint): flake8Sebastian Thiel
Interestingly only shows in particular python versions on travis. Maybe some caching effect? Locally it is reproducible easily, with the latest flake8
2016-12-08fix(submodule): don't fail if tracking branch can't be setupSebastian Thiel
Fixes #545
2016-10-24Fixes to support Python 2.6 again.Andreas Maier
Details: - Added Python 2.6 again to .travis.yml (it was removed in commit 4486bcb). - Replaced the use of dictionary comprehensions in `git/cmd.py` around line 800 with the code before that change (in commit 25a2ebf). Reason: dict comprehensions were introduced only in Python 2.7. - Changed the import source for `SkipTest` and `skipIf` from `unittest.case` to first trying `unittest` and upon ImportError from `unittest2`. This was done in `git/util.py` and in several testcases. Reason: `SkipTest` and `skipIf` were introduced to unittest only in Python 2.7, and `unittest2` is a backport of `unittest` additions to Python 2.6. - In git/test/lib/helper.py, fixed the definition of `assertRaisesRegex` to work on py26. - For Python 2.6, added the `unittest2` dependency to `requirements.txt` and changed `.travis.yml` to install `unittest2`. Because git/util.py uses SkipTest from unittest/unittest2, the dependency could not be added to `test-requirements.txt`. - Fixed an assertion in `git/test/test_index.py` to also allow a Python 2.6 specific exception message. - In `is_cygwin_git()` in `git/util.py`, replaced `check_output()` with `Popen()`. It was added in Python 2.7. - Enabled Python 2.6 for Windows: - Added Python 2.6 for MINGW in .appveyor.yml. - When defining `PROC_CREATIONFLAGS` in `git/cmd.py`, made use of certain win32 and subprocess flags that were introduced in Python 2.7, dependent on whether we run on Python 2.7 or higher. - In `AutoInterrupt.__del__()` in `git/cmd.py`, allowed for `os` not having `kill()`. `os.kill()` was added for Windows in Python 2.7 (For Linux, it existed in Python 2.6 already).
2016-10-22Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel
ankostis-cygwin
2016-10-20Fix some typosSantiago Castro
2016-10-16Merge with #532, fix unicode filenames with escapesurogatesKostis Anagnostopoulos
2016-10-16fix(surrogateescape): enable on py2, fix testsSebastian Thiel
2016-10-16fix(unicode): use surrogateescape in bytes.decodeSebastian Thiel
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
2016-10-16src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos
2016-10-16src: import os.path as ospKostis Anagnostopoulos
2016-10-12config, #525: polish more config-urlsKostis Anagnostopoulos
2016-10-11FIX #526: Do not depend on test-sourcesKostis Anagnostopoulos
+ Move `HIDE_WINDOWS_KNOWN_ERRORS` flag from `git.test.lib.helper-->git.util`; regular modules in main-sources folder also depend on that flag. + Use unittest.SkipTest instead of from non-standard `nose` lib.
2016-10-04config: FIX regression by prev commit "wrap all conf..."Kostis Anagnostopoulos
+ Bug appeared as last 5 TCs (test_commit & test_stream) said: OSError: [WinError 6] The handle is invalid
2016-10-04io: Wrap (probably) allconfig_writers in `with` blocksKostis Anagnostopoulos
2016-10-04src: No PyDev warningsKostis Anagnostopoulos
+ 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
2016-10-04hidden win-errs: Let leaking TCs run till end, then hideKostis Anagnostopoulos
+ Detect code breaking the body of TCs eventually hidden win-errors by raising SkipTest ALAP. + submodule.base.py: import classes from `git.objects` instead of `utils`. + had to ++ ulimit 100->110 for the extra code tested (more leaks :-) + Centralize is_win detection.
2016-10-03BF: Allow to remove a submodule with a remote without refsYaroslav Halchenko
2016-10-01io, #519: ALL open() --> with open()Kostis Anagnostopoulos
+ Some cases had restructuring of code.
2016-10-01Win, #519: FIX repo TCs.Kostis Anagnostopoulos
+ 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.
2016-09-29FIX hook TC on PY3+Win & indeterministic lock timing.Kostis Anagnostopoulos
+ 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
2016-08-21fix(commit): handle gpgsig properlySebastian Thiel
Assure that gpgsig is not initialized with None to allow the automatic deserialization to kick in. Fixes #500
2016-06-01Fixed 'TypeError: decode() takes no keyword arguments' on Python 2.6Andreas Maier
2016-05-30Ignore invalid data when decoding commit objectsVincent Driessen
Previously, GitPython chokes on this while decoding. Rather than choking, instead accept the error and replace the invalid bytes by the � (\x80) char.
2016-04-19Add support for getting "aware" datetime infoVincent Driessen
This adds 2 properties to commits. Their values are derived from the existing data stored on them, but this makes them more conveniently queryable: - authored_datetime - committed_datetime These return "aware" datetimes, so they are effectively companions to their raw timestamp equivalents, respectively `authored_date` and `committed_date`. These datetime instances are convenient structures since they show the author-local commit date and their UTC offset.
2015-12-14fix(tree): show that fixing Tree.cache is not possibleSebastian Thiel
The problem is that a per-tree modification API cannot work properly, as the sorting is based on full paths of all entries within the repository. This feat can only be achieved by the index, which to my knowledge already does it correctly. The only fix is to remove the misleading API entirely, which will happen in the next commit. Related to #369
2015-12-13chore(tree): remove dead codeSebastian Thiel
[skip ci]
2015-12-13fix(tree): tree item sort now uses git-styleSebastian Thiel
Previously it was possible to generate trees which didn't appear legit to git as gitpython's sorting was a simple alpha-numeric sort. Git uses one that minimizes literal string comparisons though, and thus behaves slightly differently sometimes. Fixes #369
2015-11-08fix(commit): respect daylight saving when computing utc-offsetSebastian Thiel
Related to #362
2015-08-17fix(commit): serialization timezone handlingSebastian Thiel
Previously timezones which were not divisable by 3600s would be parsed correctly, but would serialize into a full hour, rounded up. Now floating point computation is used which fixes the issue. Related to #336
2015-07-22gic {init,clone} --separate-git-dir is supported only since 1.7.5Julien Pivotto
Without this commit the update() function of a submodule does not work in CentOS 6.
2015-07-17typo in submodules api documentationJulien Pivotto
2015-07-17Added two extra paramaters for commit to take author date and commit dateavi
2015-06-25Added NullHandlers to all loggers to preven "No handler" messagesJames Nowell
When the code is run without setting up loggers, the loggers have no handlers for the emitted messages. The logging module displays: `No handlers could be found for logger "git.cmd"` on the console. By adding a NullHandler (a no-op) the message disappears, and doesn't affect logging when other handlers are configured.
2015-05-13Fix type error (startswith expects bytes)John L. Walker
2015-04-07Fix problem with submodules on WindowsMarkus Siemens
On Windows, `repo.create_submodule(...)` failed because git didn't recognize the worktree path set in `.git/modules/sub/config` (`fatal: bad config file line 6 in ./config`). This commit makes `_write_git_file_and_module_config` convert the worktree path to the linux format (forward slashes) which git recognizes.
2015-03-27Fix typoKyle P. Johnson
2015-03-02fix(iter-commit): ambiguous argument errorSebastian Thiel
In repositories like > git branch -a * test > ls test `repo.iter_commits` failed due to an ambigous argument (`'git rev-list test`). Now this cannot happen anymore. fixes #264
2015-02-20Apparently, git 1.7.9 supports git-files too, lets assume it's starting at 1.7.0Sebastian Thiel
2015-02-19Adjust minimum git version with git-file support.Sebastian Thiel
As I am pretty sure to have tested it with 1.7.0, I assume they added the git file feature somewhere between .0 .10. Fixes #252
2015-02-19Fix flake8 issue.Sebastian Thiel
It's new in the latest version of flake - thanks travis for letting me know.
2015-02-19Use uuid instead of tempfile.mkdtmp, which created an actual directory.Sebastian Thiel
That, over time, could have caused slow downs due to file-system hassle. Fixes #258
2015-01-22Overhauled all tutorials, and placed them in a unit-test.Sebastian Thiel
That way they are protected from regression. Fixes #239
2015-01-21Fixed regression in test-suite for IndexFileSebastian Thiel
Previously, it checked for AssertionErrors, now we have to implement need-unbare-repo check ourselves.
2015-01-21Added advance usage examples to tutorial and made minor fixes.Sebastian Thiel
GIT_PYTHON_TRACE would actually fail (now) if we debugged archive operations. Related to #239
2015-01-21Initial set of documentation improvements, and a fix to the submodule tests.Sebastian Thiel
Now travisci tests should work once again. Related to #239
2015-01-21Assured that branch changes are properly handled.Sebastian Thiel
Previously we could try to remove the branch we are on. Of course, we have a test-case elaborate enough to verify we don't destroy changes in submodules accidentally. Therefore I am confident that this implementation is correct. Fixes #49