<div dir="ltr"><div><div><div>For the above patch, i have fixed the changes which you told me to do so and also run the test suits but get some weird result.<br><br></div>When I type "make tests" ,it stuck into some loop but when i test each file individually, it works fine.<br>
<br></div>My query is how did you get that i hadn't run the test suite and what do mean by phrase "just let the Abort command span multiple lines" ?<br></div><div>
<div><br><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 11, 2014 at 6:10 PM, Mads Kiilerich <span dir="ltr"><<a href="mailto:mads@kiilerich.com" target="_blank">mads@kiilerich.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 02/11/2014 12:12 PM, Anurag Goel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
# HG changeset patch<br>
# User anuraggoel <<a href="mailto:anurag.dsps@gmail.com" target="_blank">anurag.dsps@gmail.com</a>><br>
# Date 1392116931 -19800<br>
#      Tue Feb 11 16:38:51 2014 +0530<br>
# Node ID 6bda034329f21f522b4bb2498bae4c<u></u>84f3653569<br>
# Parent  fff0a71f8177be4ca634784d8b603c<u></u>8e4d6c3601<br>
push: hg should provide hint when no paths configured (issue3692)<br>
<br>
Hint will be provided to the user if default path is not configured when user type "hg push" command.<br>
I also run the code on the test cases this time, all seems to work fine.<br>
</blockquote>
<br></div>
This patch is getting better!<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff -r fff0a71f8177 -r 6bda034329f2 mercurial/commands.py<br>
--- a/mercurial/commands.py     Thu Feb 06 02:17:48 2014 +0100<br>
+++ b/mercurial/commands.py     Tue Feb 11 16:38:51 2014 +0530<br>
@@ -4711,7 +4711,16 @@<br>
      dest, branches = hg.parseurl(dest, opts.get('branch'))<br>
      ui.status(_('pushing to %s\n') % util.hidepassword(dest))<br>
      revs, checkout = hg.addbranchrevs(repo, repo, branches, opts.get('rev'))<br>
-    other = hg.peer(repo, opts, dest)<br>
+    if dest == "default-push":<br>
+        try:<br>
+            other = hg.peer(repo, opts, dest)<br>
+        except error.RepoError:<br>
+            error1 = (_("repository default-push not found!"))<br>
</blockquote>
<br></div>
Why the extra ()? The 1 suffix also seems odd. I would call it "msg" like it is one in at least one or place in that file ... or do like most other places and just let the Abort command span multiple lines.<div class="">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+            hint = _("see the \"path\" section in \"hg help config\"")<br>
+            raise util.Abort(error1, hint=hint)<br>
+    else:<br>
+        other = hg.peer(repo,opts,dest)<br>
</blockquote>
<br></div>
This line proves that you haven't run the test suite. Step 9 on <a href="http://mercurial.selenic.com/wiki/ContributingChanges" target="_blank">http://mercurial.selenic.com/<u></u>wiki/ContributingChanges</a> .<br>
<br>
Also, how about adding some test coverage of this? You already got the link to <a href="http://mercurial.selenic.com/wiki/WritingTests" target="_blank">http://mercurial.selenic.com/<u></u>wiki/WritingTests</a> .<br>
<br>
One important test case: having a default-path configuration that points at a non-existing location.<span class="HOEnZb"><font color="#888888"><br>
<br>
/Mads<br>
</font></span></blockquote></div><br></div>