[PATCH] push: hg should provide hint when no paths configured (issue3692)

Anurag Goel anurag.dsps at gmail.com
Mon Feb 10 07:49:54 CST 2014


# HG changeset patch
# User anuraggoel <anurag.dsps at gmail.com>
# Date 1392039359 -19800
#      Mon Feb 10 19:05:59 2014 +0530
# Node ID 801fad142db714852451664453d5670f3f8d20d3
# Parent  fff0a71f8177be4ca634784d8b603c8e4d6c3601
push: hg should provide hint when no paths configured (issue3692)

Hint will be provided to the user if default path is not configured when user type "hg push" command.

diff -r fff0a71f8177 -r 801fad142db7 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Thu Feb 06 02:17:48 2014 +0100
+++ b/mercurial/localrepo.py	Mon Feb 10 19:05:59 2014 +0530
@@ -216,7 +216,9 @@
                     requirements.append("generaldelta")
                 requirements = set(requirements)
             else:
-                raise error.RepoError(_("repository %s not found") % path)
+                error = (_("repository %s not found!") % (path))
+                hint = _("see the \"path\" section in \"hg help config\"")
+                raise util.Abort(error, hint=hint)
         elif create:
             raise error.RepoError(_("repository %s already exists") % path)
         else:


More information about the Mercurial-devel mailing list