Show More
@@ -3711,6 +3711,13 b' def outgoing(ui, repo, dest=None, **opts' | |||||
3711 |
|
3711 | |||
3712 | Returns 0 if there are outgoing changes, 1 otherwise. |
|
3712 | Returns 0 if there are outgoing changes, 1 otherwise. | |
3713 | """ |
|
3713 | """ | |
|
3714 | # hg._outgoing() needs to re-resolve the path in order to handle #branch | |||
|
3715 | # style URLs, so don't overwrite dest. | |||
|
3716 | path = ui.paths.getpath(dest, default=('default-push', 'default')) | |||
|
3717 | if not path: | |||
|
3718 | raise error.Abort(_('default repository not configured!'), | |||
|
3719 | hint=_("see 'hg help config.paths'")) | |||
|
3720 | ||||
3714 | opts = pycompat.byteskwargs(opts) |
|
3721 | opts = pycompat.byteskwargs(opts) | |
3715 | if opts.get('graph'): |
|
3722 | if opts.get('graph'): | |
3716 | logcmdutil.checkunsupportedgraphflags([], opts) |
|
3723 | logcmdutil.checkunsupportedgraphflags([], opts) | |
@@ -3728,7 +3735,7 b' def outgoing(ui, repo, dest=None, **opts' | |||||
3728 | return 0 |
|
3735 | return 0 | |
3729 |
|
3736 | |||
3730 | if opts.get('bookmarks'): |
|
3737 | if opts.get('bookmarks'): | |
3731 | dest = ui.expandpath(dest or 'default-push', dest or 'default') |
|
3738 | dest = path.pushloc or path.loc | |
3732 | dest, branches = hg.parseurl(dest, opts.get('branch')) |
|
3739 | dest, branches = hg.parseurl(dest, opts.get('branch')) | |
3733 | other = hg.peer(repo, opts, dest) |
|
3740 | other = hg.peer(repo, opts, dest) | |
3734 | if 'bookmarks' not in other.listkeys('namespaces'): |
|
3741 | if 'bookmarks' not in other.listkeys('namespaces'): | |
@@ -3738,7 +3745,7 b' def outgoing(ui, repo, dest=None, **opts' | |||||
3738 | ui.pager('outgoing') |
|
3745 | ui.pager('outgoing') | |
3739 | return bookmarks.outgoing(ui, repo, other) |
|
3746 | return bookmarks.outgoing(ui, repo, other) | |
3740 |
|
3747 | |||
3741 | repo._subtoppath = ui.expandpath(dest or 'default-push', dest or 'default') |
|
3748 | repo._subtoppath = path.pushloc or path.loc | |
3742 | try: |
|
3749 | try: | |
3743 | return hg.outgoing(ui, repo, dest, opts) |
|
3750 | return hg.outgoing(ui, repo, dest, opts) | |
3744 | finally: |
|
3751 | finally: |
@@ -230,7 +230,7 b' test pushkeys and 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 |
@@ -56,6 +56,30 b' Clone main from hgweb' | |||||
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 |
General Comments 0
You need to be logged in to leave comments.
Login now