[PATCH] push: hg should provide hint when no paths configured (issue3692)
Anurag Goel
anurag.dsps at gmail.com
Tue Feb 11 14:58:19 CST 2014
I made the changes in the program as you suggested.
For the following patch , i am still getting into loop when type "make
test" but when i test each file individually, it works fine.
I guess now there is no coding style error then why is it so happening?
diff -r d98ba4a87427 mercurial/commands.py
--- a/mercurial/commands.py Mon Feb 10 17:31:26 2014 -0600
+++ b/mercurial/commands.py Wed Feb 12 02:17:29 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)]
On Tue, Feb 11, 2014 at 11:33 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Wed, 2014-02-12 at 01:24 +0530, Anurag Goel wrote:
> > 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.
> >
> > When I type "make tests" ,it stuck into some loop but when i test each
> file
> > individually, it works fine.
> >
> > 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" ?
>
> The test suite runs check-code, which checks your coding style. That
> line contains a coding style error.
>
> You could have written this as:
>
> raise util.Abort(_("some long string...."),
> hint=_("some other long string"))
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140212/41fe1751/attachment.html>
More information about the Mercurial-devel
mailing list