summaryrefslogtreecommitdiff
path: root/git/remote.py
Commit message (Collapse)AuthorAgeFilesLines
...
* remote: unfix fetch-infos paring of 8a2f7dce4(pydev fixes)Kostis Anagnostopoulos2016-10-111-2/+2
| | | + Mark another TC failing when not in master.
* src: No PyDev warningsKostis Anagnostopoulos2016-10-041-4/+4
| | | | | | | | + Mark all unused vars and other non-pep8 (PyDev) warnings + test_utils: + enable & fix forgotten IterableList looped path. + unittestize all assertions. + remote: minor fix progress dispatching unknown err-lines
* io, #519: ALL open() --> with open()Kostis Anagnostopoulos2016-10-011-3/+2
| | | + Some cases had restructuring of code.
* Proc, #519: Rework error-exc msgs & log thread-pumps errorsKostis Anagnostopoulos2016-09-281-2/+1
| | | | | + 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-1/+2
| | | | | + When `universal_lines==True` (515a6b9ccf8) must tel `handle_process_output` to stop decoding strings.
* src: constify is_<platform>() callsKostis Anagnostopoulos2016-09-281-1/+1
| | | + TCs: unittest-asserts for git-tests.
* src, #519: collect all is_<platform>() callsKostis Anagnostopoulos2016-09-271-10/+9
|
* BF: allow for other section names which start with a string "remote"Yaroslav Halchenko2016-09-231-1/+1
| | | | | | | | | | | | | | | | | | | by demanding a space after a word remote, and space is explicitly described as a delimiter in man git-config: To begin a subsection put its name in double quotes, separated by space from the section name, otherwise e.g. File "/usr/lib/python2.7/dist-packages/datalad/support/gitrepo.py", line 836, in get_remote_branches for remote in self.repo.remotes: File "/home/yoh/deb/gits/python-git/git/repo/base.py", line 271, in remotes return Remote.list_items(self) File "/home/yoh/deb/gits/python-git/git/util.py", line 745, in list_items out_list.extend(cls.iter_items(repo, *args, **kwargs)) File "/home/yoh/deb/gits/python-git/git/remote.py", line 453, in iter_items raise ValueError("Remote-Section has invalid format: %r" % section) ValueError: Remote-Section has invalid format: u'remotes'
* Allowed remotes to have no refs.Phil Elson2016-08-191-1/+0
|
* fix(remote): lazy PushInfo.old_commit initializationSebastian Thiel2016-06-201-4/+7
| | | | | | | | We will now populate the old_commit on demand, which will allow us to keep going even if the given commit does not exist locally. Fixes #461
* Fix for parsing non-ASCII chars in status linesVincent Driessen2016-06-141-1/+1
|
* Merge pull request #446 from guyzmo/updating_remote_url_handlingSebastian Thiel2016-06-141-0/+48
|\ | | | | Adding support for git remote set-url/get-url API to Remote
| * Switching the `urls` property to use `git remote show` instead of `git ↵Guyzmo2016-06-081-4/+4
| | | | | | | | | | | | | | | | | | remote get-url` `get-url` is a new API that is not widely available yet (introduced in git 2.7.0), and provokes failure on travis. Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
| * Adding support for git remote set-url/get-url API to RemoteGuyzmo2016-06-081-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | fix(flake): misc whitespace fixesSebastian Thiel2016-06-141-1/+0
| |
* | fix(misc): various cleanupSebastian Thiel2016-06-131-19/+3
| | | | | | | | | | | | | | | | | | Just went through all changes and adjusted them to the best of my abilities. As there are no tests to claim otherwise, I believe this is correct enough. However, it becomes evident that it's no longer possible to just make changes without backing them with a respective test.
* | Merge remote-tracking branch 'upstream/master' into ↵Barry Scott2016-06-061-1/+1
|\ \ | | | | | | | | | pr-cmd-raise-with-stderr-on-error
| * | Fix regexVincent Driessen2016-05-301-1/+1
| | | | | | | | | | | | | | | This catches the case where the matched line contains "(" or ")" characters.
* | | Fix flake8 complaintsBarry Scott2016-05-301-2/+2
| | |
* | | Return stderr lines from a pull() call that failsBarry Scott2016-05-291-0/+4
| | |
* | | Return all the stderr messge after an error is detected for pull()Barry Scott2016-05-291-2/+17
|/ /
* | fix(remote): improve version checkSebastian Thiel2016-05-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Make version check much more readable, and fix it at the same time. The previous implementation would assume progress is supported just by looking at the patch-level for instance. A quick check of the git sources seems to indicate the --progress flag exists in v1.7 of the git command-line already. Fixes #449
* | fix(remote): Add CallableRemoteProgressSebastian Thiel2016-05-291-2/+3
| | | | | | | | | | | | That way, the base type doesn't need any adjustment. Related to #450
* | chore(misc): cleanup and docsSebastian Thiel2016-05-291-24/+17
| | | | | | | | | | | | Minor adjustments to PR to match current code style. Related to #450
* | Merge remote-tracking branch 'upstream/master'Barry Scott2016-05-281-12/+25
|\ \
| * | Changing warning to debug logging, to avoid warning showing off when ↵Guyzmo2016-05-261-1/+1
| |/ | | | | | | | | | | | | | | nothing's wrong cf #444 Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
| * fix(remote): py3 compatibilitySebastian Thiel2016-05-261-2/+2
| | | | | | | | Related to #444
| * fix(remote): py3 compatibilitySebastian Thiel2016-05-261-2/+2
| |
| * fix(remote): use universal_newlines for fetch/pushSebastian Thiel2016-05-261-4/+6
| | | | | | | | | | | | That way, real-time parsing of output should finally be possible. Related to #444
| * fix(remote): real-time reading of lines from stderrSebastian Thiel2016-05-261-1/+1
| | | | | | | | | | | | That way, progress usage will behave as expected. Fixes #444
| * fix(remote): better array truncation logicSebastian Thiel2016-05-251-5/+9
| | | | | | | | | | | | | | Previously, the logic was not correct. Now it should work either way, truncating the correct list to assure both always have the same length. Related to #442
| * fix(remote): remove assertion in favour of runtime stabilitySebastian Thiel2016-05-251-4/+11
| | | | | | | | Fixes #442
* | The progress arg to push, pull, fetch and clone is now a python callable.Barry Scott2016-05-281-5/+42
|/ | | | | | | | | | | | | 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.
* Allow "@" sign in fetch output linesVincent Driessen2016-04-241-2/+1
|
* Allow "$" sign in fetch output linesVincent Driessen2016-04-201-1/+1
|
* Remove assertion over fetch refspec when explicitly specifiedrrei2016-03-291-2/+6
|
* fix(remote): asssertion message formattingSebastian Thiel2016-03-281-2/+3
| | | | Related to #396
* chore(version): set to next patch releaseSebastian Thiel2016-02-111-1/+1
|
* fix(cmd): prevent deadlock on clone/fetch/pullSebastian Thiel2016-02-071-2/+2
| | | | | | | | | | | | | | | We keep stdout closed, which seems to have the side-effect of stdout being connected to your TTY, in case you run a terminal. However, this shold also prevent deadlocks, as only stderr is used. The alternative would have been to try to fetch lines concurrently, and we have been there. For clone(), `communicate()` is used, and with some luck this will just do the right thing. Even though last time I checked, it didn't ... ? Lets see. Stab at #72
* chore(flake8): unnused importSebastian Thiel2016-02-071-1/+1
|
* fix(remote): assure only repository configurationSebastian Thiel2015-09-061-1/+1
| | | | | | | Previously it was possible for it to pick up non-repository branch configuration, even though it was unlikely. Closes #350
* fix(cmd): work with py3Sebastian Thiel2015-07-031-0/+1
| | | | | | Fixed additional test which seems to have different outcomes depending on the interpreter. This just makes it work withouth attempting to find the root cause of the issue.
* fix(cmd): don't open stdout when fetchingSebastian Thiel2015-07-031-5/+4
| | | | | | | This allows us to use the main thread to parse stderr to get progress, and resolve assertion failures hopefully once and for all. Relates to #301
* test(remote): make assertion less verboseSebastian Thiel2015-07-031-2/+3
|
* fix(remote): assert fetch respec is setSebastian Thiel2015-06-101-0/+14
| | | | | | | | | | | | It turns out we can't deal do fetches if no refspec is set as git will change the format of the fetch return values, providing less information than usual. A test was added to show that such a case will fail, and an assertion will assure we don't attempt to fetch/pull if there is no refspec for 'fetch'. Closes #296
* fix(remote): don't close stdout on fetch/pullSebastian Thiel2015-06-101-13/+2
| | | | | | | | | | | | | | Reverted changes of `fe2fbc5~2`. This caused `git-pull` to error, which now actually results in a fatal error while fetching or pulling. Previously we simply didn't check for this issue. Now we are back to a `poll` based or threaded concurrent reading from stdout and stderr to prevent a git process deadlock, and the aforementioned error. Related to #297
* While parsing errors, also detecting lines starting with error:Victor Garcia2015-06-081-1/+1
|
* fix(remote): allow to raise during push/fetchSebastian Thiel2015-04-081-2/+11
| | | | | | | | | | Do not swallow non-zero exit status during push and fetch unless we managed to parse head information. This behaviour will effetively handle cases were no work was done due to invalid refspecs or insufficient permissions. Fixes #271
* Fixed trailing white space!Sebastian Thiel2015-02-211-1/+1
| | | | | Think about how expensive this single invisible character was, with all the time and energy spent on it !
* `stale_refs()` may now also handle other kinds of references, like tags.Sebastian Thiel2015-02-211-3/+15
| | | | Fixes #260