diff options
author | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-01 16:02:20 +0200 |
---|---|---|
committer | Kostis Anagnostopoulos <ankostis@gmail.com> | 2016-10-01 16:33:20 +0200 |
commit | b8b025f719b2c3203e194580bbd0785a26c08ebd (patch) | |
tree | 8cec9ba13035f9489fdaa56e550e93bc976372fc /git/repo/base.py | |
parent | a79cf677744e2c1721fa55f934fa07034bc54b0a (diff) | |
download | gitpython-b8b025f719b2c3203e194580bbd0785a26c08ebd.tar.gz |
Win, #519: FIX repo TCs.
+ 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.
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 9cc70571..947d77d2 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -899,12 +899,8 @@ class Repo(object): try: proc = git.clone(url, path, with_extended_output=True, as_process=True, v=True, **add_progress(kwargs, git, progress)) - if progress: - handle_process_output(proc, None, progress.new_message_handler(), finalize_process) - else: - (stdout, stderr) = proc.communicate() - finalize_process(proc, stderr=stderr) - # end handle progress + progress_handler = progress and progress.new_message_handler() or None + handle_process_output(proc, None, progress_handler, finalize_process) finally: if prev_cwd is not None: os.chdir(prev_cwd) |