aboutsummaryrefslogtreecommitdiff
path: root/git/cmd.py
AgeCommit message (Collapse)Author
2019-10-23silenced iter returns a non-iteratorAnil Khatri
2019-10-15removed Unnecessary pass statementPratik Anurag
2019-07-29Fix Git.transform_kwargFrantišek Nečas
Kwargs were not transformed correctly if a value was set to 0 due to wrong if condition. Signed-off-by: František Nečas <fifinecas@seznam.cz>
2019-05-05Added a Dockerfile that creates a clean Ubuntu Xenial test environmentJames E. King III
2019-05-05Update cmd.py, fix PermissionError issue using best practicescclauss
This closes #830
2019-05-05Fix setup.py and use of requirements files.James E. King III
2018-12-22Fix docstring in cmd moduleDerek
2018-08-05Exclude kwarg when NoneAndrew Rabert
2018-08-05Fix TypeError in git.execute(..., output_stream=file)Dmitry Nikulin
This fixes #619 - raise GitCommandError(not TypeError) when output_stream is set in git.execute
2018-05-18648 max_chunk_size can be now set to control output_stream behaviorPiotr Babij
2018-03-18Unnecessary generator - rewrite as a dict comprehensionHugo
2018-03-18Rewrite unnecessary dict/list/tuple calls as literalsHugo
2018-03-18Replace function call with set literalHugo
2018-03-18Drop support for EOL Python 2.6Hugo
2017-10-05Fix encoding issue with stderr_value and kill_after_timeoutPaul Belanger
We don't properly encode our error message under python3. Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-28Merge branch 'master' into masterSebastian Thiel
2017-09-28Merge branch 'master' into masterSebastian Thiel
2017-09-28Merge branch 'master' into adding_setup_for_git_executableSebastian Thiel
2017-08-25util: move expand_path from repo/base and use it in Git class initAlexis Horgix Chotard
2017-07-26Minor bug fixesOdegard, Ken
Added tilde expansion as part of the refresh function. Added python version check such that we properly capture PermissionError in Python >=3 and OSError in Python <3.
2017-07-25Minor additional cleanupOdegard, Ken
Added additional information in the import warning/error that tells the user how to silence the warning/error. Also added a GIT_OK variable that allows for a quick check whether the refresh has succeeded instead of needing to test an actual git command.
2017-07-19implemented per-call environment variable supportAnson Mansfield
2017-07-13Renamed GIT_PYTHON_INITERR to GIT_PYTHON_REFRESHOdegard, Ken
Renamed and cleaned up variable names.
2017-07-13Removed remaining references to git.setup functionOdegard, Ken
Removed few remaining references to git.setup function (as it was renamed to refresh).
2017-07-13Expanded ability of importOdegard, Ken
Renamed GIT_PYTHON_NOWARN to GIT_PYTHON_INITERR and added values for quiet import, warning import, and raise import. These respectively mean that no message or error is printed if git is non-existent, a plain warning is printed but the import succeeds, and an ImportError exception is raised.
2017-07-09Added ability to silence initial warningOdegard, Ken
Added the ability to silence the first refresh warning upon import by setting an environment variable.
2017-07-09Moved setup function into top level __init__Odegard, Ken
Discovered that the remote module also relies on the git executable as such it also needs to be “refreshed” anytime the git executable is updated or changed. This was best solved by moving the setup function into the top level __init__ where the setup simply calls git.cmd.Git.refresh and git.remote.FetchInfo.refresh.
2017-07-09Preliminary implementation of setup/refresh functionsOdegard, Ken
Added one function (setup) and an alias (refresh simply calls setup). These functions give the developer one more way to configure the git executable path. This also allows the user to interactively adjust the git executable configured during runtime as these functions dynamically update the executable path for the entire git module.
2017-03-09Spelling fixesVille Skyttä
2017-02-25Merge pull request #582 from gitpython-developers/no_devnull_openSebastian Thiel
fix(cmd): checking process.DEVNUL were needlessly opening `os.devnull`
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-25fix(cmd): don't try to use TASKKILL on linuxSebastian Thiel
Fixes #576
2017-02-10fix(cmd): checking process.DEVNUL were needlessly opening `os.devnull`no_devnull_openKostis Anagnostopoulos
Fixes resource-leak warning on Windows Puython-3.5.3+: D:\python-3.5.2.amd64\lib\site-packages\git\cmd.py:583: ResourceWarning: unclosed file <_io.BufferedWriter name='nul'> else getattr(subprocess, 'DEVNULL', open(os.devnull, 'wb')))
2016-12-08style(cmd): pythonize cmd-args filtering for PY26, improve docstringKostis Anagnostopoulos
Apply codereview comments of #541.
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 'cygwin' of https://github.com/ankostis/GitPython into ↵Sebastian Thiel
ankostis-cygwin
2016-10-20Fix some typosSantiago Castro
2016-10-18Add a test for persistent git optionsBenjamin Poldrack
2016-10-18Allow for setting git options, that are persistent across subcommand callsBenjamin Poldrack
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-14cmd, #525: Always include stdout+stderr in exceptionsKostis Anagnostopoulos
+ Ignore `with_extended_output` arg when reaising the exception, keep its behavior when `status==0`.
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-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-12repo, cmd: DROP UNEEDED Win path for chcwd & check for '~' homedirKostis Anagnostopoulos
+ Do not abspath twice when contructing cloned repo. + Add `git.repo.base` logger.
2016-10-12pumps: FIX don't pump when proc has no streamsKostis Anagnostopoulos