aboutsummaryrefslogtreecommitdiff
path: root/git/test
AgeCommit message (Collapse)Author
2017-07-01Update changelog and improve docs on skipped testSebastian Thiel
[skip ci]
2017-07-01Try to ignore test on windows as it fails for the wrong reasonsSebastian Thiel
Here is the error log we see: ====================================================================== ERROR: test_git_submodules_and_add_sm_with_new_commit (git.test.test_submodule.TestSubmodule) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\gitpython\git\test\lib\helper.py", line 92, in wrapper return func(self, path) File "C:\projects\gitpython\git\test\test_submodule.py", line 709, in test_git_submodules_and_add_sm_with_new_commit smm.git.commit(m="new file added") File "C:\projects\gitpython\git\cmd.py", line 425, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "C:\projects\gitpython\git\cmd.py", line 877, in _call_process return self.execute(call, **exec_kwargs) File "C:\projects\gitpython\git\cmd.py", line 688, in execute raise GitCommandError(command, status, stderr_value, stdout_value) GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git commit -m new file added stderr: ' *** Please tell me who you are.
2017-07-01Maybe work around AppVeyor setting a bad email?Peter Jones
One of the submodule tests says: Traceback (most recent call last): File "C:\projects\gitpython\git\test\lib\helper.py", line 92, in wrapper return func(self, path) File "C:\projects\gitpython\git\test\test_submodule.py", line 706, in test_git_submodules_and_add_sm_with_new_commit smm.git.commit(m="new file added") File "C:\projects\gitpython\git\cmd.py", line 425, in <lambda> return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) File "C:\projects\gitpython\git\cmd.py", line 877, in _call_process return self.execute(call, **exec_kwargs) File "C:\projects\gitpython\git\cmd.py", line 688, in execute raise GitCommandError(command, status, stderr_value, stdout_value) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git commit -m new file added stderr: ' *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'appveyor@APPVYR-WIN.(none)')' Clearly this is failing because (none) isn't a valid TLD, but I figure I'll try to set a fake value and see if that works around it.
2017-07-01Repo: handle worktrees betterPeter Jones
This makes Repo("foo") work when foo/.git is a file of the form created by "git worktree add", i.e. it's a text file that says: gitdir: /home/me/project/.git/worktrees/bar and where /home/me/project/.git/ is the nominal gitdir, but /home/me/project/.git/worktrees/bar has this worktree's HEAD etc and a "gitdir" file that contains the path of foo/.git . Signed-off-by: Peter Jones <pjones@redhat.com>
2017-05-29Add base class for package exceptions.Konstantin Popov
2017-04-09Python 3.6 invalid escape sequence deprecation fixesVille Skyttä
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
2017-03-09Spelling fixesVille Skyttä
2017-03-07Add a fixture to test incremental blame output for git 2.11.1+George Hickman
2017-02-25chore(flake): satisfy linterSebastian Thiel
2017-02-25Merge branch 'git_work_tree' of https://github.com/tbhartman/GitPython into ↵Sebastian Thiel
tbhartman-git_work_tree
2017-02-25Merge pull request #555 from ankostis/cntxtmmanSebastian Thiel
Retrofit `repo` class as context-man to cleanup global mman on repo-delete
2017-02-24check for GIT_WORK_TREETimothy B. Hartman
2016-12-22fix(remote): testSebastian Thiel
Should have paid more attention to the test-failure before pushing the fix.
2016-12-08chore(lint): flake8 pacificationSebastian Thiel
2016-12-08fix(refs): handle quoted branch namesSebastian Thiel
Fixes #550
2016-12-08fix(leaks, TCs): attempt to cleanup mman before deleting tmp-dirsKostis Anagnostopoulos
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-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 'win_mmap' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel
ankostis-win_mmap
2016-10-22fix(win_mmap): unmark hidden win_errors due to smmap unicode foesKostis Anagnostopoulos
Now 2 more TCs pass in Windows: + TestRepo.test_file_handle_leaks() + TestObjDbPerformance.test_random_access() See https://github.com/gitpython-developers/smmap/pull/30
2016-10-22Merge remote-tracking branch 'origin/master' into exp_git_dirKostis Anagnostopoulos
2016-10-22submodule-TCs: stop monekypatching smmap.MapRegion with files in WindowsKostis Anagnostopoulos
Obviously it is not needed anymore, or nothing is worse without this monkeypatch.
2016-10-22Merge branch 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel
ankostis-cygwin
2016-10-20Fix some typosSantiago Castro
2016-10-19Merge with latest branch 'exp_git_dir'Kostis Anagnostopoulos
Conflicts: git/repo/base.py git/repo/fun.py git/test/test_submodule.py
2016-10-19repo: minor code and doc correcions.Kostis Anagnostopoulos
+ Expansion of paths also `osp.normalize()` them. + Make Repo-fields --> class-fields to avoid initializations on construct. + Explain and rename `git.repo.fun.find_git_dir()` is for submodules (`find_submodule_git_dir()`).
2016-10-19Fix flake8 errorBenjamin Poldrack
2016-10-18Add a test for persistent git optionsBenjamin Poldrack
2016-10-17tc-helper: fix minor contexlib abuseKostis Anagnostopoulos
2016-10-17helper: minor fix prefix of temp-dirsKostis Anagnostopoulos
2016-10-16cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 casesKostis Anagnostopoulos
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-16cygwin, #533: FIX submodules detection (~10TCs fixed)Kostis Anagnostopoulos
+ Decygpath sm's `.git` file contents. + Polish another path in `git add`; actually no main-code changes, just a replace \-->/ on a relative(!) path to make cygwin-git to work. - REGRESSION `test_git_submodules_and_add_sm_with_new_commit` asks for user/email settings. - Cygwin TCs failing: - PY2: err: 2, fail: 1 - PY3: err: 2, fail: 1
2016-10-16ci, deps: no PY26, ddt>=1.1.1, CIs `pip install test-requirements`Kostis Anagnostopoulos
+ Use environment-markers in requirement files (see http://stackoverflow.com/a/33451105/548792).
2016-10-16src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos
2016-10-16src: import os.path as ospKostis Anagnostopoulos
2016-10-16cygwin, #533: polish abs-paths in `git add` commandsKostis Anagnostopoulos
+ Modify TCs - no main-code changes. + FIXed: + `TestSubmodule.test_git_submodules_and_add_sm_with_new_commit()` + TestDiff.test_diff_with_staged_file() - Cygwin TCs failing: - PY2: err: 12, fail: 2 - PY3: err: 11, fail: 2
2016-10-14cygwin, #533: Allow '/cygdrive/c/' paths on repo initKostis Anagnostopoulos
- Cygwin TCs failing: - PY2: err: 13, fail: 2 - PY3: err: 12, fail: 2
2016-10-14cygwin, #533: FIX daemon launchingKostis Anagnostopoulos
+ Rework git-daemon launching with `with` resource-management. + cmd: add `is_cygwin` optional override kwd on `Git.polish_url()`. - Cygwin TCs failing: - PY2: err: 13, fail: 3 - PY3: err: 12, fail: 3
2016-10-14cygwin, #533: Try to make it work with Cygwin's Git.Kostis Anagnostopoulos
+ Make `Git.polish_url()` convert paths into Cygwin-friendly paths. + Add utility and soe TCs for funcs for detecting cygwin and converting abs-paths to `/cygdrive/c/...`. - Cygwin TCs failing: - PY2: err: 14, fail: 3 - PY3: err: 13, fail: 3
2016-10-14remote, #525: FIX BUG push-cmd misses error messagesKostis Anagnostopoulos
+ Bug discovered after enabling TC in prev commit and rework of fetch. + remote_tc: unitestize assertions. + util: DEL unused `_mktemp()`.
2016-10-13remote, #525: pump fetch-infos instead of GIL-read stderrKostis Anagnostopoulos
+ `handle_process_output()` accepts null-finalizer, to pump completely stderr before raising any errors. + test: Enable `TestGit.test_environment()` on Windows (to checks stderr consumption).
2016-10-13test, #525: allow disabling freeze errors separatelyKostis Anagnostopoulos
+ cmd: use DEVNULL for non PIPEs; no open-file. + TCs: some unitestize-assertions on base & remote TCs.
2016-10-12config, #525: polish more config-urlsKostis Anagnostopoulos
2016-10-12daemon, #525: simplify exception handlingKostis Anagnostopoulos
2016-10-12daemon, #525: FIX remote urls in config-filesKostis Anagnostopoulos
+ Parse most remote & config-urls \-->/. + Used relative daemon-paths. + Use git-daemon PORT above 10k; on Windows all below need Admin rights. +FIXED git-daemon @with_rw_and_rw_remote_repo(): + test_base.test_with_rw_remote_and_rw_repo() PASS. + test_remote.test_base() now freezes! (so still hidden win_err) + repo_test: minor finally delete test-repos created inside this repo. + util: delete unused `absolute_project_path()`.
2016-10-11hidden win_errors: mark also git-daemon errors failingKostis Anagnostopoulos