Thank you for response, rising ErrorResponse is much closer to what I want. But 
it doesn't work with multiline message (and no output in log ether). Any 
suggestions?

But from user point of view it is error, isn't it? He asked to push his 
changesets and they are not pushed. I want to see 'error' and what happened 
(hook output, and it may be multiple lines).
Now it's kind of confusing. I say "push this 2 changesets" and got answer like 
"Ok, blocked by hook, changesets are not pushed".

-----Original Message-----
From: Yuya Nishihara [mailto:[email protected]] On Behalf Of Yuya Nishihara
Sent: Monday, February 20, 2012 9:19 PM
To: Кирилл Тишин
Cc: [email protected]
Subject: Re: [thg] green status when blocked by remote hook

Кирилл Тишин wrote:
> I'm pushing to remote https repository. My commit is blocked by remote hook.
> But status message (above history window) is green. It says "Puth to 
> https://... aborted, ret 1".
>
> How can I make it red? I can change both local and remote settings and 
> hooks.

It looks there's no reliable way to handle remote hook failure as an error. The 
result code 1 just means "nothing to push."

Possibly you can raise ErrorResponse [1] to indicate 403 Forbidden or 
something, but there could be unwanted side-efffect.

  [1]: 
http://selenic.com/repo/hg/file/41fc1e078d68/mercurial/hgweb/common.py#l72

> If I rise an exception then message is red, but it is meanless "HTTP Error:
> 500 (Internal Server Error)" without any hook output in log.

Yes, it's kind of communication error.




------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to