1

I published a repository using the version control program mercurial. More specifically, I installed the mercurial-server program and followed the instructions as given at

http://ekkescorner.wordpress.com/blog-series/git-mercurial/step-by-step-install-mercurial-server-on-ubuntu/

and

http://dev.lshift.net/paul/mercurial-server/docbook.html

. The repository works great, but the problem is that there are no emails sent to the users when we do an hg push after we made some changes.

I found several pages on the internet describing how to supposedly solve this problem, but none of them used mercurial-server to publish the repository and the activation of sending emails with an hg push seems to differ per method of publication.

How do I activate the emailing with an hg push in case of the mercurial-server package? Do I need to setup a SMTP server for mercurial?

The hgrc file that is in the .hg folder of my repository directory is as follows.

[paths]
default = ssh://hg@<ip_address>/jays/project

[extensions]
hgext.notify = 

[hooks]
# Enable either changegroup or incoming.
# changegroup will send one email for each push,
# whereas incoming sends one email per changeset.
# Note: Configuring both is possible, but probably not
#       what you want, you'll get one email for the group
#       and one for each changeset in the group.
changegroup.notify = python:hgext.notify.hook
#commit.notify = python:hgext.notify.hook
#incoming.notify = python:hgext.notify.hook

[email]
from = <from@email.address>

[smtp]
host = <smtp.server.address>
# Optional options:
username = <smtp.server.username>
password = <smtp.server.password>
port = 465
tls = true
# local_hostname = me.example.com

# presently it is necessary to specify the baseurl for the notify
# extension to work.  It can be a dummy value if your repo isn't
# available via http
[web]
baseurl = file:///

[notify]
# multiple sources can be specified as a whitespace separated list
sources = serve push pull bundle
# set this to False when you're ready for mail to start sending
test = false
# While the subscription information can be included in this file,
#   (in which case, set: config =)
# having it in a separate file allows for it to be version controlled
# and for the option of having subscribers maintain it themselves.
config = 
# you can override the changeset template here, if you want.
# If it doesn't start with \n it may confuse the email parser.
# here's an example that makes the changeset template look more like hg log:
#template = \ndetails:   {baseurl}{webroot}/rev/{node|short}\nchangeset: {rev}:{node|short}\nuser:      {author}\ndate:      {date|date}\ndescription:\n{desc}\n
template = \ndetails:   "{baseurl}{webroot}"\nchangeset: {rev}:{node|short}\nuser:      {author}\ndate:      {date|date}\ndescription:\n{desc}\n
# max lines of diffs to include (0=none, -1=all)
maxdiff = 1000

[reposubs]
* = <first@recipient.address>
Adriaan
  • 715
  • 10
  • 22
  • Are you able to get the emails you want sent with a push over ssh (not using mercurial-server) – Paul Crowley Oct 13 '14 at 19:42
  • @PaulCrowley I'm not sure what you mean and how I should test it. Do you perhaps mean that I should set `[notify] test=true`? I also can't seem to find a way to test the smtp server for sending emails correctly. I will post my hgrc from my repository in a moment. – Adriaan Oct 13 '14 at 19:49
  • No, I mean I don't think you have a mercurial-server related problem. Find out how to get it working in the non mercurial-server case, and then if you're not able to get it working with mercurial-server then come back to me :) – Paul Crowley Oct 13 '14 at 19:52
  • @PaulCrowley We'll do. May I ask if the `hgrc` file content is fine though :D? Furthermore, I am also included in a repository managed by someone else and am receiving the corresponding emails with `hg push` just fine. Can you tell now if it is a problem with `mercurial-server`, or do you need more information? – Adriaan Oct 13 '14 at 20:00

0 Answers0