Re: about sending mercurial commit notification email script on windows

View: New views
5 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: about sending mercurial commit notification email script on windows

by Klasky, Hilda B. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

Does anyone you have a notify hook working on windows? Does anyone know how to get the hg commands to work  from a bat script? I cannot it working.

In the documentation says that we need to enable, but also, we need to have a script to run it.  The hgrc code:

[extensions]
hgext.notify =

[hooks]
commit = c:\commithook.bat

The code of commithook.bat:

REM #These works on OS X and Linux:
REM #!/bin/bash
REM #SUBJECT=$(hg log -r $HG_NODE --template '{rev}:{node|short} -- {desc|firstline}')
REM #hg log -vpr $HG_NODE | mail -s "commit: $SUBJECT" test@...
REM
REM #These does not work in Windows, it calls the sendEmail but the mercurial commands are not recognized:

set subject = hg log -r $HG_NODE --template '{rev}:{node|short} -- {desc|firstline}'
set message = hg log -vpr $HG_NODE

"C:\Program Files\sendEmail\sendEmail" -f test@...  -t test@... -s smtp.test.com:25 -u "commit: %subject%" -m "$message$"

I will appreciate any comments or suggestions. Thank you very much in advance.




_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: about sending mercurial commit notification email script on windows

by Martin Geisler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Klasky, Hilda B." <klaskyhb@...> writes:

> Hi
>
> Does anyone you have a notify hook working on windows? Does anyone
> know how to get the hg commands to work from a bat script? I cannot it
> working.
>
> In the documentation says that we need to enable, but also, we need to
> have a script to run it. The hgrc code:
>
> [extensions]
> hgext.notify =
>
> [hooks]
> commit = c:\commithook.bat
That's not how you use the notify extension. You should instead
configure the hook like this:

  [hooks]
  changegroup.notify = python:hgext.notify.hook

No external script is needed.

--
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

attachment0 (203 bytes) Download Attachment

Parent Message unknown Re: about sending mercurial commit notification email script on windows

by Martin Geisler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Klasky, Hilda B." <klaskyhb@...> writes:

Hi Hilda,

I'm sending my reply back to the list :-)

> On 11/4/09 2:32 PM, "Martin Geisler" <mg@...> wrote:
>
>> "." <klaskyhb@...> writes:
>>
>>> Does anyone you have a notify hook working on windows? Does anyone
>>> know how to get the hg commands to work from a bat script? I cannot
>>> it working.
>>>
>>> In the documentation says that we need to enable, but also, we need
>>> to have a script to run it. The hgrc code:
>>>
>>> [extensions]
>>> hgext.notify =
>>>
>>> [hooks]
>>> commit = c:\commithook.bat
>>
>> That's not how you use the notify extension. You should instead
>> configure the hook like this:
>>
>>   [hooks]
>>   changegroup.notify = python:hgext.notify.hook
>>
>> No external script is needed.

> Do you have this working on a windows environment? Because, your
> suggestion does not work.

No, I'm using Linux. I just saw what looks like a configuration error to
me. Perhaps a Windows user can help you if you describe the symptoms
you're seeing -- what happens when you do 'hg --debug push' to the
repository with the hook installed?

--
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

attachment0 (203 bytes) Download Attachment

Re: about sending mercurial commit notification email script on windows

by Klasky, Hilda B. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Martin,
Thanks for your email. Yes, perhaps a somebody who has implemented this in
windows could advice. As I said before, I have it running on Linux and OS X
as well.
Thanks again.


On 11/4/09 5:50 PM, "Martin Geisler" <mg@...> wrote:

> "Klasky, Hilda B." <klaskyhb@...> writes:
>
> Hi Hilda,
>
> I'm sending my reply back to the list :-)
>
>> On 11/4/09 2:32 PM, "Martin Geisler" <mg@...> wrote:
>>
>>> "." <klaskyhb@...> writes:
>>>
>>>> Does anyone you have a notify hook working on windows? Does anyone
>>>> know how to get the hg commands to work from a bat script? I cannot
>>>> it working.
>>>>
>>>> In the documentation says that we need to enable, but also, we need
>>>> to have a script to run it. The hgrc code:
>>>>
>>>> [extensions]
>>>> hgext.notify =
>>>>
>>>> [hooks]
>>>> commit = c:\commithook.bat
>>>
>>> That's not how you use the notify extension. You should instead
>>> configure the hook like this:
>>>
>>>   [hooks]
>>>   changegroup.notify = python:hgext.notify.hook
>>>
>>> No external script is needed.
>
>> Do you have this working on a windows environment? Because, your
>> suggestion does not work.
>
> No, I'm using Linux. I just saw what looks like a configuration error to
> me. Perhaps a Windows user can help you if you describe the symptoms
> you're seeing -- what happens when you do 'hg --debug push' to the
> repository with the hook installed?


_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial

Re: about sending mercurial commit notification email script on windows

by Kyle Altendorf-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Hilda,

Attached is an example hgrc file (modified to remove personal info)
from a shared repository accessed via TortoiseHg on Windows.  Most of
my trouble in getting it working stemmed from antivirus (McAfee)
half-blocking certain ports and other server issues.  I finally got it
working with a dummy gmail account on port 587.  Perhaps this isn't
what you're looking for (you were mentioning batch files) but it's a
start.

-kyle


On Thu, Nov 5, 2009 at 5:38 AM, Klasky, Hilda B. <klaskyhb@...> wrote:

> Hi Martin,
> Thanks for your email. Yes, perhaps a somebody who has implemented this in
> windows could advice. As I said before, I have it running on Linux and OS X
> as well.
> Thanks again.
>
>
> On 11/4/09 5:50 PM, "Martin Geisler" <mg@...> wrote:
>
>> "Klasky, Hilda B." <klaskyhb@...> writes:
>>
>> Hi Hilda,
>>
>> I'm sending my reply back to the list :-)
>>
>>> On 11/4/09 2:32 PM, "Martin Geisler" <mg@...> wrote:
>>>
>>>> "." <klaskyhb@...> writes:
>>>>
>>>>> Does anyone you have a notify hook working on windows? Does anyone
>>>>> know how to get the hg commands to work from a bat script? I cannot
>>>>> it working.
>>>>>
>>>>> In the documentation says that we need to enable, but also, we need
>>>>> to have a script to run it. The hgrc code:
>>>>>
>>>>> [extensions]
>>>>> hgext.notify =
>>>>>
>>>>> [hooks]
>>>>> commit = c:\commithook.bat
>>>>
>>>> That's not how you use the notify extension. You should instead
>>>> configure the hook like this:
>>>>
>>>>   [hooks]
>>>>   changegroup.notify = python:hgext.notify.hook
>>>>
>>>> No external script is needed.
>>
>>> Do you have this working on a windows environment? Because, your
>>> suggestion does not work.
>>
>> No, I'm using Linux. I just saw what looks like a configuration error to
>> me. Perhaps a Windows user can help you if you describe the symptoms
>> you're seeing -- what happens when you do 'hg --debug push' to the
>> repository with the hook installed?
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial@...
> http://selenic.com/mailman/listinfo/mercurial
>


_______________________________________________
Mercurial mailing list
Mercurial@...
http://selenic.com/mailman/listinfo/mercurial