comparison tests/test-ssh.t @ 38170:dfb888aae17a

outgoing: pay attention to `default:pushurl` for bookmarks and subrepos The problem here was that `default:pushurl` and `default` get translated to a single entry in `ui.paths` named 'default', with an attribute for 'pushloc', 'loc', and 'rawloc'. ui.expandpath() then always takes the `rawloc` attribute. Maybe the ui.expandpath() API is busted and should be removed? Or maybe getpath() should return a copy that adds an attribute reflecting the URL of the path chosen? I thought that I could remove the code in hg._outgoing() and pass the location resolved in commands.py as `dest`, but unfortunately that code is needed there to resolve #branch type URLs. Maybe that should be pulled up to commands.py, because I can't see any reasonable behavior for a subrepo path that's constructed out of that type of URL. The push command already resolves this early, so that works properly. But it looks like bundle, histedit, largefiles, patchbomb, and summary use a similar pattern, so they are likely similarly affected.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 28 May 2018 01:36:34 -0400
parents e69628f36196
children f1186c292d03 0ad5f064d829
comparison
equal deleted inserted replaced
38169:fc72beec2a1a 38170:dfb888aae17a
228 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces 228 $ hg debugpushkey --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
229 bookmarks 229 bookmarks
230 namespaces 230 namespaces
231 phases 231 phases
232 $ hg book foo -r 0 232 $ hg book foo -r 0
233 $ hg out -B 233 $ hg out -B --config paths.default=bogus://invalid --config paths.default:pushurl=`hg paths default`
234 comparing with ssh://user@dummy/remote 234 comparing with ssh://user@dummy/remote
235 searching for changed bookmarks 235 searching for changed bookmarks
236 foo 1160648e36ce 236 foo 1160648e36ce
237 $ hg push -B foo 237 $ hg push -B foo
238 pushing to ssh://user@dummy/remote 238 pushing to ssh://user@dummy/remote