summaryrefslogtreecommitdiff
path: root/source_control
Commit message (Collapse)AuthorAgeFilesLines
* Refreshed metadata for core modulesToshio Kuratomi2016-12-063-0/+12
|
* Call main in conditional way - source_controlFabio Alessandro Locati2016-12-051-1/+3
|
* Unquote urls in YAML - source_control (#5795)Fabio Alessandro Locati2016-12-023-10/+10
|
* [git] Set IdentitiesOnly=yes when using key_file (#5682)David Wittman2016-11-281-1/+1
| | | | | | | | | | | | | | | Sets the SSH option `IdentitiesOnly=yes` in the SSH wrapper when a `key_file` is provided to the git module. This option ensures that the provided key is used. Otherwise, the system's ssh-agent could provide undesired identities when connecting. From ssh_config(5): > Specifies that ssh(1) should only use the authentication identity and > certificate files explicitly configured in the ssh_config files or > passed on the ssh(1) command-line, even if ssh-agent(1) or a > PKCS11Provider offers more identities. The argument to this keyword > must be “yes” or “no”. This option is intended for situations where > ssh-agent offers many different identities. The default is “no”.
* Git: indicate if remote url was changed or not (#5677)Rob Cutmore2016-11-211-2/+1
|
* Change example syntax on subversion moduleSam Doran2016-11-151-3/+11
|
* Change example syntax on hg moduleSam Doran2016-11-151-2/+10
|
* Change example syntax on git moduleSam Doran2016-11-151-7/+20
|
* Fix String Type for Python 3 Branch ComparisonFahri Cihan Demirci2016-10-241-2/+2
| | | | | | * Use the `to_native` conversion method to convert a command output to the appropriate form when looking for branch names in the command output, therefore avoiding a `TypeError` in Python 3.
* Remove the yaml dep from the git moduleToshio Kuratomi2016-10-211-8/+14
|
* Fix git for py3Toshio Kuratomi2016-10-211-24/+30
| | | | | | | Comparing to the output of run_command() needs to use native strings Also fix imports: We were relying on them coming from the import of basic. A few (like yaml) weren't imported at all.
* Fix git failure for use of depth with version (#5135)Robin Roth2016-10-211-4/+5
| | | | | * Fixes #5108 * before module fails with "fatal: A branch named 'STABLE' already exists." when depth is used on a fresh clone with a non-HEAD branch
* Add separate checkout and update parameters (#5306)Matthew Jones2016-10-201-3/+38
| | | | | | | | | | | | | * Add separate checkout and update parameters This brings the svn module in line with the git module for controlling individual update and checkout functionality based on whether the directory exists or not. It also allows specifying `no` for both to pull the remote revision without performing a checkout * Update version-added for new parameters
* Add separate clone parameter (#5307)Matthew Jones2016-10-201-5/+36
| | | | | | | | | | | | | * Add separate clone parameter This brings the hg module in line with the git module for controlling individual update and checkout functionality based on whether the directory exists or not. It also allows specifying `no` for both to pull the remote revision without performing a checkout * Reflect the right added ver for the hg clone arg
* verify both tags and commits (#2654)Jamie Evans2016-10-181-1/+5
| | | This fixes a bug where the module fails to verify tags. I added a conditional statement in `verify_commit_sign()` that checks if `version` argument is a tag, if so, use `git verify-tag` instead.
* Make subversion module work on python 3Michael Scherer2016-10-171-1/+1
| | | | | | | | | | | | | In python 3, filter return a iterator and so result in this traceback: Traceback (most recent call last): File \"/tmp/ansible_kzu72kz5/ansible_module_subversion.py\", line 264, in <module> main() File \"/tmp/ansible_kzu72kz5/ansible_module_subversion.py\", line 243, in main local_mods = svn.has_local_mods() File \"/tmp/ansible_kzu72kz5/ansible_module_subversion.py\", line 178, in has_local_mods return len(filter(regex.match, lines)) > 0 TypeError: object of type 'filter' has no len()
* Do not leak the subversion password in log (#5200)Michael Scherer2016-10-131-1/+1
|
* Bulk spelling improvement to modules-core (#5225)John R Barker2016-10-132-4/+4
| | | | | | | | | | * Correct spelling mistakes * Correct more spelling issues * merge conflict * Revert typo in parms
* Fix git get_diff TypeError when fetch (#4881)Toopy2016-09-201-1/+2
|
* Speedup git module on clone and pull (#4562)Robin Roth2016-09-121-52/+40
| | | | | | | | | | | | | | * remove redundant if submodules_updated * speed up git by reducing remote commands * run fetch only once * run ls-remote less * don't run ls-remote if one would run fetch anyhow * remove unnecessary remote_branch check in clone * kept if depth and version given * fix fetch on old git versions
* to_text, to_bytes, and to_native now have surrogate_or_strict error handler ↵Toshio Kuratomi2016-09-011-2/+2
| | | | | | | | (#4630) On python3, we want to use the surrogateescape error handler if available for filesystem paths and the like. On python2, have to use strict in these circumstances. Use the new error strategy for to_text, to_bytes, and to_native that allows this.
* Remove colors from git-branch output for correct local search (#4545)Anton Onufriev2016-08-301-1/+1
| | | | | We got an error while switching on existent local branch because git module can not find branch in function get_branches if we have color.branch=always in git config.
* Port the module to run on python 3 (#4496)Michael Scherer2016-08-291-7/+10
| | | | | | | | | | | | | | | | | | | | One of the usual issue is that run_command return bytes, so we have to adapt the string to either be bytes too, or convert to string. This result into that kind of traceback: Traceback (most recent call last): File \"/tmp/ansible_ej32yu2w/ansible_module_git.py\", line 1009, in <module> main() File \"/tmp/ansible_ej32yu2w/ansible_module_git.py\", line 873, in main git_version_used = git_version(git_path, module) File \"/tmp/ansible_ej32yu2w/ansible_module_git.py\", line 788, in git_version rematch = re.search('git version (.*)$', out) File \"/usr/lib64/python3.5/re.py\", line 173, in search return _compile(pattern, flags).search(string) TypeError: cannot use a string pattern on a bytes-like object Another issue is filter being a object instead of a list.
* Clarify that refspec is needed to checkout a git hash (#4564)Robin Roth2016-08-271-2/+3
| | | fixes #1531
* Fix hg for python3 (#4528)Toshio Kuratomi2016-08-241-6/+9
| | | | * Remove import of unused ConfigParser (ConfigParser has been renamed in py3) * When retrieving version, normalize to a native string
* git: add a umask parameter (#4473)jctanner2016-08-191-0/+22
| | | | | | | Sources #10504 Fixes #10279
* git: set the file:// protocol if needed and refactor HEAD parser (#4434)jctanner2016-08-151-7/+40
| | | | | | | | | | * make HEAD parsing more robust * Fail the module for any splitter errors * fix combining depth and version on filepath urls by prepending file:// Addresses #907
* [git] Determine branch name more reliable (#907)Timmo Verlaan2016-08-151-1/+1
| | | | | | * Made some changes to determine branch name more reliable (it may contain slashes now). * Determination of branch name more reliable, as per comment on PR #907
* git: Use a local copy of unfrackpath to avoid using ansible.lib (#4426)jctanner2016-08-151-3/+7
| | | Fixes #4425
* git: If force=yes, apply --force to submodule updates to overwrite local ↵jctanner2016-08-121-2/+4
| | | | | changes (#4415) Fixes #238
* Git: Determine if remote URL is being changed (#4243)Rob Cutmore2016-08-121-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | * Git: Determine if remote URL is being changed Ansible reported there were no changes when only the remote URL for a repo was changed. This properly tracks and reports when the remote URL for a repo changes. Fixes #4006 * Fix handling of local repo paths * Git: Use newer method for fetching remote URL * Git: use ls-remote to fetch remote URL Using ls-remote to fetch remote URL is supported in earlier versions of Git compared to using remote command. * Maintain previous behavior for older Git versions Previously whether or not the remote URL changed was not factored into command's changed status. Git versions prior to 1.7.5 lack the functionality used for fetching a repo's remote URL so these versions will update the remote URL without affecting the changed status.
* git: save changed submodules in check and non-check mode (#4392)jctanner2016-08-111-1/+3
|
* Add diff mode support to git module (#3364)Dag Wieers2016-08-111-20/+58
| | | | | | | | | | | | | | * Add diffmode support to git module This patch adds missing diffmode support to the git module. * Remodel get_diff() and calls to it As proposed by @abadger * Ensure we fetch the required object before performing a diff Also we handle the return code ourselves, so don't leave this up to run_command().
* Revert "Reset all locale environment variables before running svn commands" ↵Zoltán Müllner2016-08-081-1/+1
| | | | | | | | | | (#4358) * Revert "Reset all locale environment variables before running svn commands" This reverts commit 99456fbc9851209f4482cdf6c246806ba1e9fbff. * Reset locale environment variables before running svn commands
* Fix git shallow update (#3912)Robin Roth2016-07-051-16/+37
| | | | | | | | | | | | | | | | | | * remove unused variables * fetch branch name instead of HEAD fix #3782, which was introduced by f1bacc1d3f9578f26d4ae2f66112cbb2509a7fe8 * disable git depth option for old git versions fixes #3782 git support for `--depth` did not fully work in old git versions (before 1.8.2) fall back to full clones/fetches on those versions * raise required git version to 1.9.1 for depth option * use correct depth argument in switch_version
* Add commentToshio Kuratomi2016-06-211-0/+4
|
* git: fix change testing when version is HEAD (#3025)Marius Gedminas2016-06-211-0/+2
| | | | | | | | When `version` is not specified, it defaults to "HEAD". "HEAD" is not a remote tag, and it's not listed in the output of get_branches(), so we'd keep repo_updated at the default value (None) and then return early with changed=True in --check mode, even when before == after. Fixes #3024.
* Revert "Fix git shallow update (#3794)" -- Broke integration tests:Toshio Kuratomi2016-06-091-36/+14
| | | | | | https://app.shippable.com/runs/57599a7897ae890c00c2898d This reverts commit c26eb1217fae8703a7b9cd8ae708051c58fc9273.
* Fix git shallow update (#3794)Robin Roth2016-06-091-14/+36
| | | | | | | | | | | | | | * remove unused variables * fetch branch name instead of HEAD fix #3782, which was introduced by f1bacc1d3f9578f26d4ae2f66112cbb2509a7fe8 * disable git depth option for old git versions fixes #3782 git support for `--depth` did not fully work in old git versions (before 1.8.2) fall back to full clones/fetches on those versions
* Improve error reporting when git binary fail (#3266)Michael Scherer2016-05-201-6/+6
| | | | Showing stderr or stdout is a great help to understand when something go south.
* Use the proper type for 'dest' argumentMichael Scherer2016-05-141-2/+2
|
* Add a better solution for the ssh_known_hosts issueMichael Scherer2016-04-281-1/+2
| | | Fix https://github.com/ansible/ansible/issues/10172 too
* Merge pull request #3507 from resmo/fix/git-porcelain-statusToshio Kuratomi2016-04-211-1/+1
|\ | | | | git: fix status to use porcelain, ignore user configuration
| * git: fix status to use porcelain, ignore user configurationRene Moser2016-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | From the git status doc: --porcelain Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details. User configuration can break the git module from working as expected.
* | fix git switch branches in combination with depth on old git versions (#3492)Robin Roth2016-04-211-8/+21
|/ | | | | | | | | | | | | | | | * fix git switch branches in combination with depth * the old implementation is correct, but relies on git working correctly (as only newer versions do) * with some older git version (e.g. 1.8.3), git fetch remote branch does not work, if the branch does not yet exist locally * this patch works around that without explicitly checking the git version * future refactoring is needed to reduce the number of fetches to a minimum; but this patch makes the code "correct" * add git version requirements to doc * replace set-branches with git 1.7.1 compatible version
* Merge pull request #3466 from robinro/git-full-clone-with-hashToshio Kuratomi2016-04-191-4/+9
|\ | | | | git: fall back to full clone if version is hash
| * fall back to full clone if version is hashRobin Roth2016-04-191-4/+9
| | | | | | | | if version is not a branch or tag (i.e. a hash), we need a full checkout to be able to switch to it
* | with depth only fetch actual versionRobin Roth2016-04-191-1/+1
|/ | | | | | * don't use refs/heads/branchname for branches * for tags it's needed thou * fixes #3456
* Log git error stdout/stderr to fail_json (#3022)Kyle Dyroff2016-04-191-4/+8
|
* make git updates respect depth (#3254)Robin Roth2016-04-141-15/+40
| | | | | | | | | | | | | | * make git updates respect depth until now `fetch` gets all tags and heads at full depth, this change * uses `depth` argument for `fetch` * only get the specified `version` in `fetch` * fixes #14954 * treat combination of refspec and depth correctly * be more conservative for non-depth fetch