5

i am using Mercurial for version control. One central repo is shared among the team and any of us can push / pull to it.

How can i get notified when any other user push something to the central repo.

I have tried to edit my hgrc file as per the https://www.mercurial-scm.org/wiki/NotifyExtension

as below

    [extensions]
hgext.notify =

[hooks]
# Enable either changegroup or incoming.
# changegroup will send one email for each push,
# whereas incoming sends one email per changeset.
changegroup.notify = python:hgext.notify.hook
#incoming.notify = python:hgext.notify.hook

[email]
from = **myemailaddresshere**

[smtp]
host = localhost

# 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 = **http://repoip:port/**

[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 = True

[reposubs]
* = **toemailaddresshere**

#config = /path/to/subscription/file
# 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
maxdiff = 300 # max lines of diffs to include (0=none, -1=all)

then i tried to push sme changes . But this didnt fire any email. Can you please check what is error in my .hgrc file

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
png
  • 4,368
  • 7
  • 69
  • 118
  • 1
    Uhm, what have you searched for? Are you looking for http://mercurial.selenic.com/wiki/NotifyExtension ? – Patrick Apr 09 '12 at 11:22
  • There are many other extensions to choose from as well, http://mercurial.selenic.com/wiki/UsingExtensions. not everyone related to notification though, but a good list to browse – Patrick Apr 09 '12 at 11:23
  • Thank you for your comment. I had seen this page on search but i was not clear what exactly to be done. I had edited my hgrc file but it didnt send any notification. – png Apr 09 '12 at 12:32
  • this link was useful though its still not working for me http://morecode.wordpress.com/2007/08/03/setting-up-mercurial-to-e-mail-on-a-commit/ – png Apr 09 '12 at 12:33
  • "It's not working" is the most horrid statement you can use when trying to get someone to help you... Perhaps you can update your question to ask about the extension. What have you tried, where is it failing and so on – Patrick Apr 09 '12 at 12:36
  • Sorry about that. I have updated my question. I hope now its clear. Sorry for being not clear. Thanks for your responses – png Apr 09 '12 at 12:46
  • Do you get some error? Can you check the logs for the mail server at localhost to see if any mails are coming in? – Patrick Apr 09 '12 at 12:48
  • i did not get any error . I couldnt get to check the logs for mail server (i dont know where to check, tried some search to find out how ). But i did not receive any mail delivery failure notification. From hg usually i get progress indication like "checking for changes" ,"merging" , .. I didnt get any such message about sending mail – png Apr 10 '12 at 05:54

2 Answers2

1

Your Notify extension is configured to be in test mode. Maybe setting test = False will help?

Michal Sznajder
  • 9,338
  • 4
  • 44
  • 62
0

template and maxdiff should be in the [notify] section. In your sample, they are in the [reposubs] section.

You can use hg help to check if the notify extension is enabled.

Maxence
  • 12,868
  • 5
  • 57
  • 69