summaryrefslogtreecommitdiff
path: root/git/test
Commit message (Collapse)AuthorAgeFilesLines
...
* FIX hook TC on PY3+Win & indeterministic lock timing.Kostis Anagnostopoulos2016-09-292-2/+6
| | | | | | | | | + 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
* FIX tox/requirementsKostis Anagnostopoulos2016-09-291-3/+3
|
* remote, #519: INCOMPLETE FIX-2 double-decoding push-infosKostis Anagnostopoulos2016-09-281-1/+2
| | | | + Unicode PY2/3 issues fixed also in pump stream func.
* Proc, #519: Rework error-exc msgs & log thread-pumps errorsKostis Anagnostopoulos2016-09-284-5/+148
| | | | | + No WindowsError exception. + Add `test_exc.py` for unicode issues. + Single-arg for decoding-streams in pump-func.
* remote, #519: FIX1-of-2 double-decoding push-infosKostis Anagnostopoulos2016-09-281-2/+6
| | | | | + When `universal_lines==True` (515a6b9ccf8) must tel `handle_process_output` to stop decoding strings.
* Win, hook, #519: Consume Hook Popen-proc out of GILKostis Anagnostopoulos2016-09-281-71/+85
| | | | | | | | + 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.
* io, dif: #519: FIX DIFF freeze when reading from GILKostis Anagnostopoulos2016-09-281-10/+10
| | | | | | | | | | | | | | | + CAUSE: In Windows, Diffs freeze while reading Popen streams, probably buffers smaller; good-thin(TM) in this case because reading a Popen-proc from the launching-thread freezes GIL. The alternative to use `proc.communicate()` also relies on big buffers. + SOLUTION: Use `cmd.handle_process_output()` to consume Diff-proc streams. + Retroffited `handle_process_output()` code to support also byte-streams, both Threading(Windows) and Select/Poll (Posix) paths updated. - TODO: Unfortunately, `Diff._index_from_patch_format()` still slurps input; need to re-phrase header-regexes linewise to resolve it.
* test: Start using `ddt` library for TCsKostis Anagnostopoulos2016-09-281-12/+16
| | | | | + DataDriven TCs for identifying which separate case failed. + appveyor: rework matrix, conda3.4 cannot install in develop mode
* Win, #519: FIX with_rw_directory() to remove read-only dirsKostis Anagnostopoulos2016-09-2812-48/+64
| | | | | + Stop using gitdb's respective helper. + Fix files chmod(555) which CANNOT DELETE on Windows (but do on Linux).
* TCs: unittestize many test-docs assertionsKostis Anagnostopoulos2016-09-281-29/+29
|
* src: constify is_<platform>() callsKostis Anagnostopoulos2016-09-286-29/+30
| | | + TCs: unittest-asserts for git-tests.
* Win, #519: FIX undead Git-daemon on WindowsKostis Anagnostopoulos2016-09-283-10/+31
| | | | | | | | | | | + On MINGW-git, daemon exists but if invoked as 'git daemon', DAEMON CANNOT DIE! + So, launch `git-daemon` on Apveyor, but - remote TCs fail due to paths problems. + Updated README instructions on Windows. + Restore disabled remote TCs on Windows. + Disable failures on daemon-tests only the last moment (raise SkipTest) so when ready, it will also pass.
* test, #519: No remote TCs, git-daemon cannot die@!Kostis Anagnostopoulos2016-09-282-2/+5
|
* test, #519: Try appveyor advice for never-ending buildsKostis Anagnostopoulos2016-09-283-47/+50
| | | | | | | | | | | + see http://help.appveyor.com/discussions/problems/5334-nosetests-finsih-bu-build-stuck-and-next-job-dealys-to-start + Use `io.DEFAULT_BUFFER_SIZE`. + test_commit: replace asserts with unittest-asserts. - TRY Popen() NO universal_newlines: NO, reverted in next commits. + [travisci skip]
* src, #519: Improve daemon launch so Win does not stuckKostis Anagnostopoulos2016-09-271-31/+38
| | | | | | | + Retrofit try...finally blocks to ensure killing the daemon - now vulnerable also on Windows due to Popen() + CREATE_NEW_PROCESS_GROUP - BUT `test_base.test_with_rw_remote_and_rw_repo()` TC fails in MINGW due to invalid remote-URL in fetching-repo's config. Another day. - NEXT FREEZE to solve: test-diff_interface() under MINGW!
* src, #519: collect all is_<platform>() callsKostis Anagnostopoulos2016-09-276-17/+17
|
* win, #519: proc.terminate() instead of kill(SIGTERM)Kostis Anagnostopoulos2016-09-262-39/+41
| | | + test_diff: replace asserts with unittest-asserts.
* Win, #519: FIX WinHangs: Popen() CREATE_NEW_PROCESS_GROUP to allow killKostis Anagnostopoulos2016-09-262-7/+10
| | | | | + FIXED most hangs BUT no more `git-daemon` un-killable! + Use logger for utils to replace stray print().
* test, #519: Popen() universal_newlin.es NoWindow in WinfoesKostis Anagnostopoulos2016-09-263-1/+11
| | | | | | + More win-fixes: + Do not check unicode files in < py3. + util, #519: x4 timeout of lock-file blocking, failing in Appveyor.
* test, #519: FIX appveyor conda & failures in py2.6 `assertRaisesRegexp`Kostis Anagnostopoulos2016-09-263-5/+11
|
* apveyor, #519: FIX incomplete Popen pumpKostis Anagnostopoulos2016-09-261-3/+5
| | | | | | | | + The code in `_read_lines_from_fno()` was reading the stream only once per invocation, so when input was larger than `mmap.PAGESIZE`, bytes were forgotten in the stream. + Replaced buffer-building code with iterate-on-file-descriptors. + Also set deamon-threads.
* apveyor: simplify test.Kostis Anagnostopoulos2016-09-261-1/+1
|
* win: GC.collect on all TC.tearDown to fix appveyor hang runsKostis Anagnostopoulos2016-09-269-3/+38
| | | | | + Fixed the hangs at `test_git:TestGit.test_handle_process_output()`. [travisci skip]
* test, deps: FIX `mock` deps on py3.Kostis Anagnostopoulos2016-09-253-11/+22
| | | | + Del extra spaces, import os.path as osp
* fix(test): put `test_commits` backSebastian Thiel2016-09-251-0/+1
| | | | Thanks to @yarikoptic for catching this one !
* fix(test): deal with py2 and py3Sebastian Thiel2016-09-251-1/+3
| | | | | | It ain't pretty, but should do the job. Related to #514
* fix(index): improve LockedFD handlingSebastian Thiel2016-09-251-0/+17
| | | | | | | | | | Relying on the destructor will not work, even though the code used to rely on it. Now we handle failures more explicitly. Far from perfect, but a good start for a fix. Fixes #514
* fix(Head): checkout() handles detached headSebastian Thiel2016-09-111-0/+6
| | | | | | | | | It's not optimal, as we can now return one of two types which are only compatible in the most basic ways. However, it is better than before, I presume. Fixes #510
* fix(repo): make it serializable with pickleSebastian Thiel2016-09-111-1/+5
| | | | | | | It's entirely untested if this repo still does the right thing, but I'd think it does. Fixes #504
* Update Remotes section (#502)Forrest Hopkins2016-08-241-2/+7
| | | | | Update Remotes section The Remotes section was missing some pretty important info.
* fix(commit): handle gpgsig properlySebastian Thiel2016-08-211-1/+29
| | | | | | | Assure that gpgsig is not initialized with None to allow the automatic deserialization to kick in. Fixes #500
* Updated unittest.Phil Elson2016-08-191-2/+2
|
* Merge pull request #496 from haizaar/masterSebastian Thiel2016-08-021-0/+18
|\ | | | | is_dirty supports path. Fixes #482.
| * is_dirty supports path. Fixes #482.Zaar Hai2016-08-011-0/+18
| |
* | fix flake8 problemsBarry Scott2016-08-011-3/+3
| |
* | add test to detect the corrupt logBarry Scott2016-08-011-1/+12
| | | | | | | | - add a second line to commit messages with the "BAD MESSAGE" text - read in the log and confirm that the seond line is not in the log file
* | fix(diff): use explicit change-type if possibleSebastian Thiel2016-07-232-0/+10
| | | | | | | | | | | | | | | | | | | | That way, we do not have to figure the change type out by examining the diff object. It's implemented in a way that should yield more desireable results as we keep the change-type that git is providing us with. Fixes #493
* | fix(blame): lazily fetch full commit messageSebastian Thiel2016-07-171-1/+1
|/ | | | | | | | | | That way, we will not only get the summary line contained in the blame, but fetch the full message. This is more costly than the previous implementation allowed it to be, but being less surprising/correct certainly is the preferred behaviour here. Fixes #485
* Store raw path bytes in Diff instanceskeep-raw-bytes-on-diffsVincent Driessen2016-06-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix(test_docs): skip master-dependent assertionSebastian Thiel2016-06-141-1/+3
| | | | | It usually fails on branches, which doesn't help assessing PRs.
* Merge pull request #446 from guyzmo/updating_remote_url_handlingSebastian Thiel2016-06-141-2/+47
|\ | | | | Adding support for git remote set-url/get-url API to Remote
| * Adding support for git remote set-url/get-url API to RemoteGuyzmo2016-06-081-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both commands enable handling of a little known feature of git, which is to support multiple URL for one remote. You can add multiple url using the `set_url` subcommand of `git remote`. As listing them is also handy, there's a nice method to do it, using `get_url`. * adding set_url method that maps to the git remote set-url command¶ * can be used to set an URL, or replace an URL with optional positional arg¶ * can be used to add, delete URL with kwargs (matching set-url options)¶ * adding add_url, delete_url methods that wraps around set_url for conveniency¶ * adding urls property that yields an iterator over the setup urls for a remote¶ * adding a test suite that checks all use case scenarii of this added API.¶ Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
* | Merge pull request #467 from ↵Sebastian Thiel2016-06-142-6/+14
|\ \ | | | | | | | | | | | | gitpython-developers/fix-dont-choke-on-invalid-unicode-paths Don't choke on (legitimately) invalidly encoded Unicode paths
| * | Don't choke on (legitimately) invalidly encoded Unicode pathsfix-dont-choke-on-invalid-unicode-pathsVincent Driessen2016-06-062-6/+14
| | |
* | | fix(cmd): allow any kind of status messageSebastian Thiel2016-06-131-1/+0
|/ / | | | | | | | | I see no need in verifying the status code. It's enough to just get the error.
* | fix(test): remove unused importSebastian Thiel2016-06-021-1/+1
| |
* | fix(test): do not skip test on travisSebastian Thiel2016-06-011-2/+0
| | | | | | | | | | | | | | Please exclude the particular assertion instead. Related to https://github.com/gitpython-developers/GitPython/commit/a3f24f64a20d1e09917288f67fd21969f4444acd#commitcomment-17691581
* | Merge pull request #456 from ↵Sebastian Thiel2016-05-302-0/+13
|\ \ | | | | | | | | | | | | gitpython-developers/fix-for-invalid-data-in-commits Add test case as example of Git commit with invalid data
| * | Add test case as example of Git commit with invalid dataVincent Driessen2016-05-302-0/+13
| |/ | | | | | | | | | | | | | | | | | | This is a real commit from the microjs.com open source project, see https://github.com/madrobby/microjs.com/commit/7e8457c17850d0991763941213dcb403d80f39f8, which is declared to be encoded in UTF-8, but contains invalid bytes. This makes GitPython choke on it while decoding. Rather than choking, this should instead accept the error and replace the invalid bytes by the � (\x80) char.
* | Merge pull request #454 from ↵Sebastian Thiel2016-05-302-6/+14
|\ \ | | | | | | | | | | | | gitpython-developers/fix-octal-escaped-path-parser-bug Fix bug in diff parser output