diff -r d4a5193332b3 -r 07f09995e857 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Jun 30 03:39:32 2017 +0200 +++ b/mercurial/debugcommands.py Tue Sep 12 11:18:35 2017 -0400 @@ -2085,10 +2085,10 @@ 'Windows')) if not source: + if not repo: + raise error.Abort(_("there is no Mercurial repository here, and no " + "server specified")) source = "default" - elif not repo: - raise error.Abort(_("there is no Mercurial repository here, and no " - "server specified")) source, branches = hg.parseurl(ui.expandpath(source)) url = util.url(source)