Commit graph

190 commits

Author SHA1 Message Date
jctanner
51a6ed8657 Merge pull request #4731 from pcgentry/devel
new githooks module
2013-11-14 10:17:39 -08:00
Michael DeHaan
8687525d18 Fix documentation formatting. 2013-10-31 20:00:11 -04:00
Michael DeHaan
50ef750a25 Suggest keyscan for github/other SCM hanging. 2013-10-31 18:00:24 -04:00
Christian Goetze
c25d7e4165 Add support for bare git reference repos
This adds two parameters to the git module:

  bare (boolean)
    Indicates this is to be a bare repositori

  reference (string)
    Indicates the path or url to the reference repo.
    Check out the "--reference" option in the "git clone"
    man page

Added appropriate tests.
2013-10-31 10:56:14 -07:00
Phillip
22d679ffc5 adding the githooks module 2013-10-30 09:03:11 -05:00
Yap Sok Ann
e568c63108 git: Don't add --branch while cloning if the version is a SHA-1 hash. 2013-10-16 20:37:07 +08:00
Yap Sok Ann
d77276380f git: Handle network problem when running git ls-remote. 2013-10-16 20:37:07 +08:00
Yap Sok Ann
633438bfbb git: Always return the before/after revisions, even in check mode.
The return values from check mode and non-check mode should match in all cases,
except when a SHA-1 hash is used as version, as there is no way to check if it
is a valid hash using `git ls-remote`.

Also, to accomodate this change, the force flag for the reset function has been
removed so that we can do the checking in main.
2013-10-16 20:37:07 +08:00
Yap Sok Ann
12c4bf51b8 git: Make function get_remote_head usable when cloning.
This allows the module to return the before/after revisions in all cases.
2013-10-16 20:37:07 +08:00
Yap Sok Ann
3ff0c6d50d git: Remove unnecessary return code checking.
The functions either return rc=0 or call fail_json themselves.
2013-10-16 20:37:06 +08:00
Yap Sok Ann
201ff02d1f git: Full length SHA-1 in, full length SHA-1 out.
This removes ambiguity at the expense of slight backward incompatibility.
2013-10-16 20:37:06 +08:00
Mads Weitling
f5c04e2ff4 Fix Hg.__init__(...) reading value from self.hg_path 2013-10-10 15:46:10 +00:00
Mads Weitling
f2f7060454 Fix 'hg module fails with: AttributeError: 'AnsibleModule' object has no attribute 'parames'' 2013-10-10 17:15:04 +02:00
James Tanner
1a9a6da4f7 fix docstring indentation on scc modules 2013-10-01 16:46:17 -04:00
Skylar Saveland
d7e5fcf30f add executable option to subversion module 2013-09-26 14:27:40 -07:00
Skylar Saveland
bb4619e716 add executable option to hg, refactor in doing so 2013-09-26 14:27:16 -07:00
Skylar Saveland
3f74c2d986 add executable option to bzr module, refactor in doing so 2013-09-26 14:26:46 -07:00
Skylar Saveland
198c4702bd executable option to git module 2013-09-26 14:15:28 -07:00
Steve Fox
cf0ffda163 Elaborate on capabilities of subversion module 2013-09-24 11:10:09 -05:00
James Cammarata
102833cca6 Merge branch 'gitfix' of https://github.com/johanwiren/ansible into johanwiren-gitfix 2013-08-22 15:30:58 -05:00
Johan Wirén
3ac5f2d409 Fixed so that we no longer check with the remote if a checkout already is at the desired sha version. 2013-08-22 22:05:37 +02:00
Stephen Fromm
544bcfb30d Apply consistent parameter alises to hg and subversion
For issue #3372, apply consistent parameter aliases to source_control
modules.  For hg, add name and version and add to documentation string.
For subversion, add version and document version and name aliases in
documentation string.
2013-08-20 13:43:26 -05:00
Drew Blas
d912de2dff Added git disclaimer about dealing with ssh host checking
This disclaimer already exists in library/source_control/hg but not here.  It affects both and was discussed awhile back on: https://groups.google.com/forum/#!msg/ansible-project/q9G9xIdsRxo/XJhQzuS-qSoJ  However no PR was ever sent to fix the doc.
2013-08-07 15:33:29 -05:00
Michael DeHaan
ac5fb3ffda Merge pull request #3744 from jimi1283/issue_3360
Allow destination paths in the hg module to include a tilde (~)
2013-08-03 10:29:03 -07:00
James Cammarata
e5822b5342 Allow destination paths in the hg module to include a tilde (~)
Fixes issue #3360 - Inconsistent behavior of the hg module w.r.t. dest path
2013-08-02 18:03:20 -05:00
Petr Svoboda
cbbd9c257d Tidy up fix of git module traceback 2013-08-02 12:54:06 +02:00
Petr Svoboda
85396cbd26 Fix traceback in git module when version checkout fails
"UnboundLocalError: local variable 'branch' referenced before assignment" is
raised in git, line 282, in switch_version.

Exception is raised when version is not branch and version checkout fails.
E.g. when version is nonexistant commit.
2013-08-01 12:10:43 +02:00
Michael DeHaan
10ac8ba3de Don't add --version HEAD parameter is already HEAD, some versions of git don't like this. 2013-07-20 11:24:16 -04:00
James Laska
cf563c6838 Resolve incompatability between depth and version
Git is unable to checkout the specified `version` when the repository is
cloned with a reduced history (`depth`).  However, if the repository is
already cloned, subsequent git module calls will update the repository
(default update=True), then properly checkout the specified `version`.
To allow the initial call to properly clone the specified `version`, at
the specified `depth`, this patch adds the `--branch` parameter when
cloning the repository.
2013-07-18 17:03:17 -04:00
Michael DeHaan
2a1a68a672 Merge pull request #3432 from jlund/hg-spelling
Fix some minor spelling mistakes in the hg module documentation
2013-07-11 05:26:57 -07:00
Matt Spaulding
3e631c1129 Fix git submodule update when version specified 2013-07-03 17:19:14 -07:00
Joshua Lund
bcfdc4c534 Fix some minor spelling mistakes in the hg module documentation 2013-07-03 13:23:08 -06:00
Stephen Fromm
ddee9187f0 Add submodule support to git module
This does two things:
* add --recursive option to git clone command in clone().  This will
  initialize all submodules when cloning a remote repository.
* Add submodule_update() and call that from fetch().  submodule_update()
  calls two git commands iff the file .gitmodules exists in the
  repository:
  * 'git submodule sync' - synchronizes the submodules' remote URL
    configuration setting to the value in .gitmodules.
  * 'git submodule update --init --recursive' - initialize and update
    registered submodules to the commit specified in the index of the
    containing repository.

If a repository was cloned without --recursive, submodule_update() will
ensure that the submodules are initialized and updated.
2013-06-20 14:48:39 -07:00
Jan-Piet Mens
3404a0fc16 DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
  Added deprecation warning to moduledev.rst and remove deprecated example from it
  Fixed up a few typos and uppercased some acronyms.
  add consistency to how EXAMPLES are formatted
2013-06-15 20:54:25 +02:00
Michael DeHaan
9c59057c1f Docs standardization 2013-06-01 12:15:19 -04:00
Benjamin Schwarze
3f95f15bb4 remove unused git function is_current_branch (looks like it returns always True anyway which might be wrong) 2013-05-31 22:27:56 +02:00
Benjamin Schwarze
9d296924de use module.get_bin_path('git', True) once and pass git_path to functions 2013-05-31 21:42:15 +02:00
Stoned Elipot
a7c5e6246e Fix typo in git module documentation preventing it to be processed by ansible-doc 2013-05-24 01:33:47 +02:00
Jesse Keating
20943b0410 Add an update option to the git module
This will allow just making sure the repo exists w/out actually making
any chnages to it. Useful if you're going to run a play repeatedly
against a host that might have active development going on in the
repository (think initial bootstrap of a developers system, and
continued playbook runs to work on other projects).
2013-05-15 22:14:17 -07:00
Michael DeHaan
cd97a4cb14 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00