Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mercurial Module: Pass the identity_path portion as own arg #36546

Merged
merged 1 commit into from
Sep 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions salt/modules/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __virtual__():


def _ssh_flag(identity_path):
return '--ssh "ssh -i {0}"'.format(identity_path)
return ['--ssh', 'ssh -i {0}'.format(identity_path)]


def revision(cwd, rev='tip', short=False, user=None):
Expand Down Expand Up @@ -181,7 +181,7 @@ def pull(cwd, opts=None, user=None, identity=None, repository=None):
'''
cmd = ['hg', 'pull']
if identity:
cmd.append(_ssh_flag(identity))
cmd.extend(_ssh_flag(identity))
if opts:
for opt in opts.split():
cmd.append(opt)
Expand Down Expand Up @@ -250,7 +250,7 @@ def clone(cwd, repository, opts=None, user=None, identity=None):
for opt in opts.split():
cmd.append('{0}'.format(opt))
if identity:
cmd.append(_ssh_flag(identity))
cmd.extend(_ssh_flag(identity))
return __salt__['cmd.run'](cmd, runas=user, python_shell=False)


Expand Down