[PATCH] push: hg should provide hint when no paths configured (issue3692)
Anurag Goel
anurag.dsps at gmail.com
Wed Feb 12 09:03:50 UTC 2014
# HG changeset patch
# User anuraggoel <anurag.dsps at gmail.com>
# Date 1392195655 -19800
# Wed Feb 12 14:30:55 2014 +0530
# Node ID b2bf72fc6b1aca8e697e7d00cb1b2eec37cca8d6
# Parent d98ba4a87427ce601dd23de8d4f5288cc44fe945
push: hg should provide hint when no paths configured (issue3692)
I made the changes which mentors told me to do so.
I also run the "test suits" and it passed perfectly.Please guide me ,what should i do next.
diff -r d98ba4a87427 -r b2bf72fc6b1a mercurial/commands.py
--- a/mercurial/commands.py Mon Feb 10 17:31:26 2014 -0600
+++ b/mercurial/commands.py Wed Feb 12 14:30:55 2014 +0530
@@ -4722,7 +4722,14 @@
dest, branches = hg.parseurl(dest, opts.get('branch'))
ui.status(_('pushing to %s\n') % util.hidepassword(dest))
revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))
- other = hg.peer(repo, opts, dest)
+ if dest == "default-push":
+ try:
+ other = hg.peer(repo, opts, dest)
+ except error.RepoError:
+ raise util.Abort(_("repository default-push not found!"),
+ hint=_("see the \"path\" section in \"hg help config\""))
+ else:
+ other = hg.peer(repo, opts, dest)
if revs:
revs = [repo.lookup(r) for r in scmutil.revrange(repo, revs)]
More information about the Mercurial-devel
mailing list