-
Notifications
You must be signed in to change notification settings - Fork 285
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
Conversation
@@ -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) |
There was a problem hiding this comment.
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})
Seems so. I guess the legacy replacement for keyword arguments that I used was not quite legacy enough. |
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).
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) |
There was a problem hiding this comment.
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!
(By the way, yes you got the rebase workflow correctly!) |
Only add ssh options to commands that actually talk to the network.
Only add ssh options to commands that actually talk to the network.
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).