comparison mercurial/hg.py @ 46720:66fb04552122

ui: pass a `ui` object to `paths.getpath` I want to introduce more path's suboption and make it possible to use default value for them. Processing theses sub-options might result in warnings. We need a `ui` object to issue such warnings. To make things simpler, we add an helper method on the `ui` object. Differential Revision: https://phab.mercurial-scm.org/D10162
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 11 Mar 2021 17:26:49 +0100
parents a4c19a162615
children af7535249ea9
comparison
equal deleted inserted replaced
46719:0732a7264226 46720:66fb04552122
1315 1315
1316 return _incoming(display, subreporecurse, ui, repo, source, opts) 1316 return _incoming(display, subreporecurse, ui, repo, source, opts)
1317 1317
1318 1318
1319 def _outgoing(ui, repo, dest, opts): 1319 def _outgoing(ui, repo, dest, opts):
1320 path = ui.paths.getpath(dest, default=(b'default-push', b'default')) 1320 path = ui.getpath(dest, default=(b'default-push', b'default'))
1321 if not path: 1321 if not path:
1322 raise error.Abort( 1322 raise error.Abort(
1323 _(b'default repository not configured!'), 1323 _(b'default repository not configured!'),
1324 hint=_(b"see 'hg help config.paths'"), 1324 hint=_(b"see 'hg help config.paths'"),
1325 ) 1325 )