comparison tests/test-subrepo-relative-path.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 b4b7427b5786
children 41ac8ea1bdd7
comparison
equal deleted inserted replaced
38169:fc72beec2a1a 38170:dfb888aae17a
54 adding file changes 54 adding file changes
55 added 1 changesets with 1 changes to 1 files 55 added 1 changesets with 1 changes to 1 files
56 new changesets 863c1745b441 56 new changesets 863c1745b441
57 3 files updated, 0 files merged, 0 files removed, 0 files unresolved 57 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 58
59 Ensure that subrepos pay attention to default:pushurl
60
61 $ cat > cloned/.hg/hgrc << EOF
62 > [paths]
63 > default:pushurl = http://localhost:$HGPORT/main
64 > EOF
65
66 $ hg -R cloned out -S --config paths.default=bogus://invalid
67 comparing with http://localhost:$HGPORT/main
68 searching for changes
69 no changes found
70 comparing with http://localhost:$HGPORT/sub
71 searching for changes
72 no changes found
73 [1]
74
75 $ hg -R cloned push --config paths.default=bogus://invalid
76 pushing to http://localhost:$HGPORT/main
77 no changes made to subrepo sub since last push to http://localhost:$HGPORT/sub
78 searching for changes
79 no changes found
80 abort: HTTP Error 403: ssl required
81 [255]
82
59 Checking cloned repo ids 83 Checking cloned repo ids
60 84
61 $ hg id -R cloned 85 $ hg id -R cloned
62 fdfeeb3e979e tip 86 fdfeeb3e979e tip
63 $ hg id -R cloned/sub 87 $ hg id -R cloned/sub