P4D2::Allow different protocols for Push and Pull

Issue #111 open
Former user created an issue

Just starting to play with hg and MacHg but ran into something confusing. I started with command-line hg to get the project set up. The repository's .hg/hgrc file contains

[paths] default = http://xxx/hg default-push = ssh://me@xxx//v/hg

And everything works fine. I can pull and I can push. Yea, I could probably pull via ssh too but that's not how it's currently set up.

So now I install MacHg, drag over my working directory and MacHg will only push via http. Even using the an external hg command. Looking at the generated command it appears to be forcing the remote path as configured in the gui rather than using the defaults as stored in the configuration file.

/usr/local/bin/hg push --cwd /Users/me/testdir http://xxx/hg

Is there any way to pull via http and push via ssh? Did I just do something obviously daft when starting up MacHg?

Comments (7)

  1. Anonymous

    After playing a bit I realized it was my mistake. I guess I had added default-push after I had already opened the repository in MacHg. After a restart and a re-drag I now see my repo and repo (default-push) repositories and can choose between them. Unfortunately the gui doesn't appear to keep defaults for pull/push/in/out? I'm always having to switch between the pull and push repositories.

  2. Joe Pallas

    I think something going on here may be an actual bug. I have a similar configuration (http for default, ssh for default-push) and when I do "Incoming …" I get the dialog box for my ssh keychain password. The box disappears before I finish typing my password, and then it reappears. This time it sticks around until I finish entering my password. But the transaction log claims that the underlying incoming command was done using the http URL.

    So, what did MacHg do that caused not one but two ssh keychain password prompts but in the end didn't use ssh?

  3. Jason Harris repo owner

    Thanks for your comments Joe,

    But... All logins need to be non-interactive... Is the dialog box asking for your ssh password put up by ssh-agent? Thats the only thing that should be putting up a popup asking for your password. See http://machghelp.jasonfharris.com/kb/connections/ssh-connections-and-passwords and http://machghelp.jasonfharris.com/kb/connections/how-do-i-set-up-a-server-bookmark.

    When doing connections MacHg often does both incoming and outgoing connections automatically in the background... These don't show up in the logs. Thats how MacHg can display those nice incoming / outgoing counts in the sidebar.

    The real topic of this bug (#111) is if MacHg should respect the default paths set up in the hgrc or if it should respect the paths as set up inside MacHg. Which one should have precedence? Thats the question...

    Cheers, Jas

  4. Log in to comment