|
|
@ -70,8 +70,8 @@ import re
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Subversion(object):
|
|
|
|
class Subversion(object):
|
|
|
|
def __init__(self, fail_callback, dest, repo, revision, username, password):
|
|
|
|
def __init__(self, module, dest, repo, revision, username, password):
|
|
|
|
self.fail_callback = fail_callback
|
|
|
|
self.module = module
|
|
|
|
self.dest = dest
|
|
|
|
self.dest = dest
|
|
|
|
self.repo = repo
|
|
|
|
self.repo = repo
|
|
|
|
self.revision = revision
|
|
|
|
self.revision = revision
|
|
|
@ -89,7 +89,7 @@ class Subversion(object):
|
|
|
|
out, err = cmd.communicate()
|
|
|
|
out, err = cmd.communicate()
|
|
|
|
rc = cmd.returncode
|
|
|
|
rc = cmd.returncode
|
|
|
|
if rc != 0:
|
|
|
|
if rc != 0:
|
|
|
|
self.fail_callback(msg=err)
|
|
|
|
self.module.fail_json(msg=err)
|
|
|
|
return out.splitlines()
|
|
|
|
return out.splitlines()
|
|
|
|
|
|
|
|
|
|
|
|
def checkout(self):
|
|
|
|
def checkout(self):
|
|
|
@ -146,7 +146,7 @@ def main():
|
|
|
|
username = module.params['username']
|
|
|
|
username = module.params['username']
|
|
|
|
password = module.params['password']
|
|
|
|
password = module.params['password']
|
|
|
|
|
|
|
|
|
|
|
|
svn = Subversion(module.fail_json, dest, repo, revision, username, password)
|
|
|
|
svn = Subversion(module, dest, repo, revision, username, password)
|
|
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(dest):
|
|
|
|
if not os.path.exists(dest):
|
|
|
|
before = None
|
|
|
|
before = None
|
|
|
|