<div dir="ltr"><div><div>Apologize for the mistake of "more than 80 characters" in one line.<br><br></div>About the duplication of the 'other =' line, i don't think always catching RepoError would be a good idea.<br>
</div><div>There are different RepoError with different abort messages.So if we always catch RepoError then we have to handle each error message explicitly.<br></div><div>For eg. abort message by "RepoError"  in file "mercurial/sshpeer.py" and "mercurial/localrepo.py" is different.   <br>
</div><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Feb 22, 2014 at 9:09 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/22/2014 03:14 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 1393077250 -19800<br>
#      Sat Feb 22 19:24:10 2014 +0530<br>
# Node ID b542f30f7b0a71608fa4e43030b35c<u></u>7226753b87<br>
# Parent  0e2877f8605dcaf4fdf2ab7e0046f1<u></u>f6f80161dd<br>
push: provide a hint when no paths in configured (issue3692)<br>
<br>
When user type "hg push" command then this patch helps user by providing hint if no default path is configured.<br>
</blockquote>
<br>
</div><a href="http://mercurial.selenic.com/wiki/ContributingChanges#Patch_descriptions" target="_blank">http://mercurial.selenic.com/<u></u>wiki/ContributingChanges#<u></u>Patch_descriptions</a><br>
"all lines less than 80 characters"<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff -r 0e2877f8605d -r b542f30f7b0a mercurial/commands.py<br>
--- a/mercurial/commands.py     Sat Feb 15 22:09:32 2014 -0600<br>
+++ b/mercurial/commands.py     Sat Feb 22 19:24:10 2014 +0530<br>
@@ -4614,7 +4614,15 @@<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>
+            raise util.Abort(_("repository default-push not found!"),<br>
</blockquote>
<br></div>
How about <a href="http://bz.selenic.com/show_bug.cgi?id=3692#c3" target="_blank">http://bz.selenic.com/show_<u></u>bug.cgi?id=3692#c3</a> ?<br>
<br>
(Actually, I would prefer to say something like "default repository not configured" and leave the description of the actual names 'default' and 'default-push' to the help.)<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>
+    else:<br>
+        other = hg.peer(repo, opts, dest)<br>
</blockquote>
<br></div>
This way of doing it gives duplication of the 'other =' line.<br>
<br>
How about always catching RepoError, then check if dest is default-push and either abort or re-raise.<span class="HOEnZb"><font color="#888888"><br>
<br>
/Mads<br>
<br>
</font></span></blockquote></div><br></div>