1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Ticket #24452 (assigned)

Opened 2 years ago

Last modified 2 years ago

No response from hg's notify function.

Reported by: acmacm Owned by: ctsai
Keywords: PEND Cc:
Private: no

Description

I'm attempting to set up mercurial's 'notify' extension to send email to a project mailing list. I am accessing hg via "hg push" over an SSH line to SF, totally normally.

I have attached my repository's .hg/hgrc config file. (This repo is at /home/scm_hg/c/cc/cc-mode/cc-mode-0) [Correction: a bug in Trac prevented me attaching this file. It is inline below.]

When I push a change to SF, I see no reponse whatsoever from 'notify'. I see responses from my debugging hooks, so I know that 'incoming' hooks, in general, are being run. It's just I get no response from 'notify' - no error messages, no progress reports, no nothing.

Is something up with 'notify'? Help, please!

Thanks.

################################################################
[paths]
default = /home/scm_hg/c/cc/cc-mode/cc-mode

[extensions]
notify =

[hooks]
incoming.notify = python:hgext.notify.hook
incoming.echo = echo 'incoming.echo'
# one email for all incoming changesets
changegroup.notify = python:hgext.notify.hook

# one email for all outgoing changesets
# outgoing.notify = python:hgext.notify.hook

[reposubs]
# key is glob pattern, value is a comma-separated list of subscriber
# emails
/home/scm_hg/c/cc/cc-mode/cc-mode-0 = acm@…

[notify]
#config = /home/acm/hg-notify-config
config =
#sources = serve push pull

#template = X-Hg-Repo: {webroot}\n
# Subject: {webroot}: {desc|firstline|strip}\n
# From: {author}
# \n\n
# changeset {node|short} in {root}
# \n\ndetails:
# {baseurl}{webroot}?cmd=changeset;node={node|short}
# description: {desc|tabindent|strip}

#test = false

Change History

Changed 2 years ago by ctsai

  • keywords PEND added; hg notify removed
  • owner set to ctsai
  • status changed from new to assigned

Hello,

To send mail via a SCM repo hook, you should use sendmail.

To specify that for hg, in your hgrc file you should have:

[email]
method = /usr/sbin/sendmail

Let me know if this helps.

Regards,
Chris Tsai, SourceForge.net Support

Changed 2 years ago by acmacm

Hi, Chris,

I added "[email]\nmethod = /usr/sbin/sendmail" to my config, but it hasn't yet made a difference. (No doubt I'll need it after the other problems have been sorted out, though.)

The big thing is, I'm getting no response whatsoever from hgext.notify.hook. I would have expected some sort of error message at the very least. With "test = false" commented out of my hgrc, I ought to see some message on stderr (my ssh terminal). Something important is wrong with my config in .hg/hgrc.

--
Alan Mackenzie (Nuremberg, Germany).

Note: See TracTickets for help on using tickets.