# HG changeset patch # User Martin von Zweigbergk # Date 1603209360 25200 # Node ID 1bf1dcbc995034ee8072fae00ded45fd6045ed2f # Parent bff71952581572b113c42a7c26fec4e9d8dc2771 errors: raise more specific errors when default remote not configured Differential Revision: https://phab.mercurial-scm.org/D9312 diff -r bff719525815 -r 1bf1dcbc9950 mercurial/commands.py --- a/mercurial/commands.py Thu Oct 22 13:56:01 2020 -0700 +++ b/mercurial/commands.py Tue Oct 20 08:56:00 2020 -0700 @@ -4903,7 +4903,7 @@ # style URLs, so don't overwrite dest. path = ui.paths.getpath(dest, default=(b'default-push', b'default')) if not path: - raise error.Abort( + raise error.ConfigError( _(b'default repository not configured!'), hint=_(b"see 'hg help config.paths'"), ) @@ -5524,7 +5524,7 @@ path = ui.paths.getpath(dest, default=(b'default-push', b'default')) if not path: - raise error.Abort( + raise error.ConfigError( _(b'default repository not configured!'), hint=_(b"see 'hg help config.paths'"), ) diff -r bff719525815 -r 1bf1dcbc9950 tests/test-default-push.t --- a/tests/test-default-push.t Thu Oct 22 13:56:01 2020 -0700 +++ b/tests/test-default-push.t Tue Oct 20 08:56:00 2020 -0700 @@ -20,7 +20,7 @@ $ hg push --config paths.default= abort: default repository not configured! (see 'hg help config.paths') - [255] + [30] $ cd ..