Кирилл Тишин wrote:
> Just to confirm in case that I misunderstand.
> This is not issue with my hook, settings, or whatever but bug
> in tortoisehg with no workaround available?

My understanding is

  - maybe your hook script is correct
  - Mercurial doesn't report rejection by remote hook in a special manner
  - so TortoiseHg cannot handle it specially, for now
    (but it should be improved in some future)

Could you report this issue to BTS?

   https://bitbucket.org/tortoisehg/thg/issues

Regards,

> Кирилл Тишин wrote:
>> 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".
>
> I know the current behavior is a bit confusing as you said, but there's no 
> easy and reliable way to detect push failure. The return code 1 doesn't 
> _always_ mean an error.
>
> Also the hook output from remote host isn't labeled as 'ui.error'.
>
>> Кирилл Тишин 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.

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to