Skip to content

Only add ssh options to commands that actually talk to the network. #121

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Apr 3, 2014
Merged

Conversation

fkrull
Copy link

@fkrull fkrull commented Feb 14, 2014

At least in Mercurial 2.8.2, --ssh seems to be a command-specific parameter in contrast to a global one. As a result, local commands error when seeing a --ssh parameter. This change passes --ssh only for commands that actually talk to the network ('incoming', 'pull' and 'clone' here).

@@ -92,7 +92,7 @@ def clone_repository(revision)
end
args.push(@resource.value(:source),
@resource.value(:path))
hg_wrapper(*args)
hg_wrapper(*args, :remote => true)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may need to wrap the second parameter in curly braces for Ruby 1.8.7 compatibility: hg_wrapper(*args, {:remote => true})

@fkrull
Copy link
Author

fkrull commented Feb 15, 2014

Seems so. I guess the legacy replacement for keyword arguments that I used was not quite legacy enough.

@igalic
Copy link

igalic commented Feb 16, 2014

May still want to squash the commits and add the explanations to a single commit message instead.

At least in Mercurial 2.8.2, --ssh seems to be a command-specific parameter in
contrast to a global one. As a result, local commands error when seeing a --ssh
parameter. This change passes --ssh only for commands that actually talk to the
network ('incoming', 'pull' and 'clone' here).
@fkrull
Copy link
Author

fkrull commented Feb 16, 2014

Alright, this it? I'm not too familiar with this workflow.

@@ -92,6 +92,7 @@ def clone_repository(revision)
end
args.push(@resource.value(:source),
@resource.value(:path))
args.push({ :remote => true })
hg_wrapper(*args)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, did hg_wrapper(*args, {:remote => true}) not work after all? Your solution is a reasonable workaround. Thanks for updating your commit!

@sodabrew
Copy link

(By the way, yes you got the rebase workflow correctly!)

apenney pushed a commit that referenced this pull request Apr 3, 2014
Only add ssh options to commands that actually talk to the network.
@apenney apenney merged commit 1e0f7c6 into puppetlabs:master Apr 3, 2014
cegeka-jenkins pushed a commit to cegeka/puppet-vcsrepo that referenced this pull request Jan 3, 2018
Only add ssh options to commands that actually talk to the network.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants