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

Conversation

rallytime
Copy link
Contributor

@rallytime rallytime commented Sep 23, 2016

What does this PR do?

When we pass in an identity file to use with the --ssh option in the hg.py execution module, the ssh -i <identity file> portion needs to be passed along as its own arg in the list of command args passed cmd.run.

What issues does this PR fix or reference?

Fixes #36514

Previous Behavior

When using the mercurial sate with the identity option set, the state would fail because the --ssh "ssh -i /indentity/file" way of passing the command was tripping up the cmd.run call:

local:
----------
          ID: mercurial
    Function: hg.latest
        Name: ssh://hg@bitbucket.org/nickwilliams/influx-salt
      Result: False
     Comment: hg clone: invalid arguments
              hg clone [OPTION]... SOURCE [DEST]

              make a copy of an existing repository

              options:

               -U --noupdate          the clone will include an empty working copy (only a
                                      repository)
               -u --updaterev REV     revision, tag or branch to check out
               -r --rev REV [+]       include the specified changeset
               -b --branch BRANCH [+] clone only the specified branch
                  --pull              use pull protocol to copy metadata
                  --uncompressed      use uncompressed transfer (fast over LAN)
               -e --ssh CMD           specify ssh command to use
                  --remotecmd CMD     specify hg command to run on the remote side
                  --insecure          do not verify server certificate (ignoring web.cacerts
                                      config)

              [+] marked option can be specified multiple times

              use "hg help clone" to show the full help text
     Started: 21:55:07.034511
    Duration: 114.811 ms
     Changes:

Summary for local
------------
Succeeded: 0
Failed:    1
------------
Total states run:     1

New Behavior

The list of args are passed correctly to the cmd.run function and we no longer have an error.

Tests written?

No

Please review Salt's Contributing Guide for best practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants