aboutsummaryrefslogtreecommitdiff
path: root/git/repo/base.py
AgeCommit message (Collapse)Author
2017-02-25Merge pull request #555 from ankostis/cntxtmmanSebastian Thiel
Retrofit `repo` class as context-man to cleanup global mman on repo-delete
2016-12-31DOC: minor typoRaphael Boidol
2016-12-08chore(repo): remove commentSebastian Thiel
As it does not appear to be the case. See https://github.com/gitpython-developers/GitPython/issues/547#issuecomment-257270026 [skip ci]
2016-12-08fix(leaks): repo context-man to cleanup global mman on repo-deleteKostis Anagnostopoulos
Improve API for problems like #553.
2016-10-22fix(repo): Use GIT_DIR only if no repo-path givenKostis Anagnostopoulos
FIX #535 according to Byron's comment: https://github.com/gitpython-developers/GitPython/issues/535#issuecomment-255522529
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 #535: expand also GIT_DIR var on Repo-constructKostis Anagnostopoulos
+ Ignore "empty" GIT_DIR vars. + Improve documentation on the constructor `path` parameter.
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-16src: reduce needless deps to `gitdb.util`Kostis Anagnostopoulos
2016-10-16src: import os.path as ospKostis Anagnostopoulos
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: Polish also --git-separate-dirKostis Anagnostopoulos
- 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-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-04io: Wrap (probably) allconfig_writers in `with` blocksKostis Anagnostopoulos
2016-10-02FIX regression by #519 on reading stdout/stderr of cmdsKostis Anagnostopoulos
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-10-01repo-TCs, #519: FIX config resource leaksKostis Anagnostopoulos
+ Modify lock/read-config-file code to ensure files closed. + Use `with GitConfigarser()` more systematically in TCs. + Clear any locks left hanging from prev Tcs. + Util: mark lock-files as SHORT_LIVED; save some SSDs...
2016-09-28src: constify is_<platform>() callsKostis Anagnostopoulos
+ TCs: unittest-asserts for git-tests.
2016-09-27src, #519: collect all is_<platform>() callsKostis Anagnostopoulos
2016-09-11fix(repo): make it serializable with pickleSebastian Thiel
It's entirely untested if this repo still does the right thing, but I'd think it does. Fixes #504
2016-08-17use $GIT_DIR when setPiotr Gaczkowski
2016-08-02Merge pull request #496 from haizaar/masterSebastian Thiel
is_dirty supports path. Fixes #482.
2016-08-01is_dirty supports path. Fixes #482.Zaar Hai
2016-07-17fix(blame): lazily fetch full commit messageSebastian Thiel
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
2016-06-13fix(repo): prevent error messages from being swallowedSebastian Thiel
This issue must have rosen from `to_progress_instance()` being inserted in a spot where `None` was a legit value. Fixes #462
2016-05-29chore(misc): cleanup and docsSebastian Thiel
Minor adjustments to PR to match current code style. Related to #450
2016-05-28The progress arg to push, pull, fetch and clone is now a python callable.Barry Scott
This simplifies the API and removes the parser, RemoteProgres, from the API as RemoteProgress is an internal detail of the implementation. progress is accepted as: * None - drop progress messages * callable (function etc) - call the function with the same args as update * object - assume its RemoteProgress derived as use as before RemoteProgress takes an optional progress_function argument. It will call the progress function if not None otherwise call self.update as it used to.
2016-05-24Ignore trailing last empty string in .split() outputVincent Driessen
2016-05-24Check if byte string is empty for py3 compatibilityJonathan Chu
2016-05-24Split lines by new line charactersJonathan Chu
Opt to split lines by the new line character instead of letting `splitlines()` do this. This helps catch the issue when there are special characters in the line, particular the commit summary section.
2016-05-19Use correct mode for executable filesSebastian Thiel
Fixes #430
2016-05-19Clarify costs of certain propertiesSebastian Thiel
Fixes #428
2016-04-14Return all available data from git-blameVincent Driessen
Returning this now to avoid having to change the function's return value structure later on if we want to emit more information.
2016-04-14Drop dependency on sixVincent Driessen
2016-04-13Allow passing args to git-blameVincent Driessen
This can be used to pass options like -C or -M.
2016-04-13Add incremental blame supportVincent Driessen
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.
2016-02-20enable config parsers to be used as context managersRaphael Boidol
if used as context managers, the parsers will automatically release their file locks.
2016-02-14fix(cmd): allow improved errors during clone operationSebastian Thiel
Related to #383
2016-02-07fix(clone): call communicate if there is no progress handlerSebastian Thiel
Previously, it could have happened that pipes ran full, deadlocking the operation Related to #72
2015-08-22fix(repo): use GitCmdObjectDB by defaultSebastian Thiel
This should fix resource leaking issues once and for all. Related #304
2015-07-21Implement is_ancestorSandy Carter
Wrap `git merge-base --is-ancestor` into its own function because it acts as a boolean check unlike base `git merge-base call`
2015-07-20fix(flake8): remove unused importSebastian Thiel
I knew that flake would eventually get me, especially when least suspected. This time it's even useful, as it is a non-whitespace related issue.
2015-07-20fix(encoding): in `untracked_files()`Sebastian Thiel
I have no idea why PY3 requires such a mess of encoding/decoding statements, but let's just be happy it works. Also let's be sure I never ever write python code again ... EVER.
2015-07-20fix(encoding): in untracked_files() and indexSebastian Thiel
* untracked_files could, if there were spaces in the path returned, re-rencode the previously decoded unicode string thanks to a `decode("string_escape")` call. Now re-encode into utf-8 afterwards - added test to assure this works indeed * IndexFile.add() didn't handle unicode correctly and would write broken index files. The solution was to compute the path length after encoding it into utf-8 bytes, not before ... . Closes #320
2015-07-16Correct doc errorsMarian Wieczorek
revA..revB &rarr; revA...revB (three instead of two dots) [base.py, line 467](https://github.com/gitpython-developers/GitPython/blob/master/git/repo/base.py#L467) rorepo is a ~~a~~ Repo instance [test_docs.py, line 21](https://github.com/gitpython-developers/GitPython/blob/master/git/test/test_docs.py#L21) closes #314
2015-06-30Add env parameter to Repo.clone_from() for setting environment variablesJon Lund Steffensen
Adds the optional keyword parameter env to Repo.clone_from(). The parameter is a dictionary containing the desired environment variables for the git clone invocation. The environment is applied to the temporary Git instance before calling Repo._clone().
2015-06-29Fix docstring of Repo.clone_from()Jon Lund Steffensen