diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -2078,10 +2078,10 @@ def debugssl(ui, repo, source=None, **op '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)