Enable push notification on Mercurial repository
Saturday Apr 28, 2007
OS: Solaris Nevada (build 59, sparc)
Mercurial: 0.9.3
Due to the lack of 'diffstat' tool on Solaris, the notification extension (hgext.notify) doesn't work well on Solaris. After several trying, I finally made it work.
Here is the setup steps:
- vi .hg/hgrc
[web]
contact = {your name}
description = Docking Workspace for Solaris WOS, SunSolve (Patch) and JES
style = gitweb
allow_archive = gz zip bz2
[extensions]
hgext.patchbomb =
hgext.notify =
[hooks]
# send one email per change
#incoming.notify = python:hgext.notify.hook
# send one email per group of changes
changegroup.notify = python:hgext.notify.hook
[email]
from = svnroot@agc163.prc.sun.com
method = /usr/sbin/sendmail
[web]
baseurl = http://agc163.prc.sun.com/hg/
[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
config =
# repos live in /workspace/scm/hg/hgroot on server, so strip 5 "/" chars
strip = 5
# 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
[reposubs]
# key is glob pattern, value is comma-separated list of subscriber emails
* = {email address} - When tried to push back, it failed
[gbuild@agc141 s11]$ hg push
Enter passphrase for key '/export/home/gbuild/.ssh/id_dsa':
pushing to ssh://hgroot@agc163.prc.sun.com/docking
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 76 changes to 76 files
remote: /bin/sh: diffstat: not found
remote: error: changegroup.notify hook raised an exception: [Errno 32] Broken pipe
[gbuild@agc141 s11]$ - After searching on Internet, I found the patch for Solaris
http://www.selenic.com/mercurial/bts/file270/diffstat.patchdiff -r 730cbd26552c -r 79639a44dd23 mercurial/patch.py
--- a/mercurial/patch.py Wed Apr 04 02:28:29 2007 -0300
+++ b/mercurial/patch.py Wed Apr 04 03:09:26 2007 -0300
@@ -635,6 +635,8 @@ def export(repo, revs, template='hg-%h.p
single(rev, seqno+1, fp)
def diffstat(patchlines):
+ if not util.find_in_path('diffstat', os.environ.get('PATH', '')):
+ return
fd, name = tempfile.mkstemp(prefix="hg-patchbomb-", suffix=".txt")
try:
p = popen2.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name) - But it still failed when push back
[gbuild@agc141 s10u3]$ hg --traceback push
Enter passphrase for key '/export/home/gbuild/.ssh/id_dsa':
pushing to ssh://hgroot@agc163.prc.sun.com/docking
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 8 changes to 8 files
remote: # /usr/lib/python2.4/vendor-packages/mercurial/patch.pyc has bad mtime 1177746898 vs 1172046709
remote: error: changegroup.notify hook raised an exception: cannot concatenate 'str' and 'NoneType' objects
[gbuild@agc141 s10u3]$ - After rename /usr/lib/python2.4/vendor-packages/mercurial/patch.pyc, the error still existed.
- I finally found following patch after several trying:
--- /usr/lib/python2.4/vendor-packages/mercurial/patch.py.old Sat Apr 28 19:02:05 2007
+++ /usr/lib/python2.4/vendor-packages/mercurial/patch.py Sat Apr 28 16:29:14 2007
@@ -659,6 +659,8 @@
single(repo.lookup(rev), seqno+1, fp)
def diffstat(patchlines):
+ if not util.find_in_path('diffstat', os.environ.get('PATH', '')):
+ return ""
fd, name = tempfile.mkstemp(prefix="hg-patchbomb-", suffix=".txt")
try:
p = popen2.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name)












http://www.nizikaikun.com/
http://www.ms-online.co.jp/eshop/goods/ona_hole.php
http://www.ms-online.co.jp/eshop/goods/costume.php
http://www.ms-online.co.jp/eshop/goods/vibe.php
http://www.ms-shop.co.jp/shop/goods/goods.asp?category=5308
http://www.omochacha.com/
http://www.av-one.jp/zero/top.html
http://www.a-world.co.jp/
http://www.a-toy.ne.jp/
http://www.s-one-company.jp/
http://www.ec-life.co.jp/bath/index2.html
http://www.tbnetjapan.com/medlegal/
http://adultshop.co.jp/omocha.html
http://adultshop.co.jp/adultshop.html
http://adultshop.co.jp/enemagra.html
http://adultshop.co.jp/onahole.html
http://adultshop.co.jp/houkei.html
http://adultshop.co.jp/anal.html
http://adultshop.co.jp/denma.html
http://www.nicolas-dogs.com/
http://www.aqua01.net/
http://www.kabudayo.com/
http://www.fxf-business.com/
http://kaketayo.sakura.ne.jp/
http://www.11cash.net/
http://telink.jp/
http://www.complete-watch.com/
http://adultshop.co.jp/dutch.html
http://www.blyjapon.com/
http://www.achelabo.jp/
http://umanity.jp/
http://www.worldflower.net/rs/
http://furniture.michiookamoto.com/
http://www.blyjapon.com/
http://www.achelabo.jp/
http://www.open-japan.com/
http://www.open-japan.com/ideabox/index.php?category=beauty#top
http://www.open-japan.com/ideabox/index.php?category=dress#top
http://www.eic-av.com/
http://www.eic-av.com/list/fileIndex
http://www.saimu0.jp/
http://www.chasetokyo.com/charge.html
http://www.chasetokyo.com/whereabouts.html
http://www.chasetokyo.com/action.html
http://www.chasetokyo.com/immorality.html
http://www.chasetokyo.com/philippines.html
http://www.sigmac.jp/
http://www.tokei-biho.com/
http://www.rmtplusone.com/lineage2/
http://www.takumi-pg.com/
http://www.webtravel.co.jp/asia/chaina/
http://www.webtravel.co.jp/
http://www.trivy-system.com/Kekkon.htm
http://www.trivy-system.com/Sinyou.htm
Posted by thanhvn on December 18, 2008 at 11:51 PM CST #
http://www.ihappyshopping.com/
http://www.ihappyshopping.com/Category/Asus-AC-Adapter/
http://www.ihappyshopping.com/Category/Toshiba-AC-Adapter/
http://www.ihappyshopping.com/Category/Acer-AC-Adapter/
http://www.ihappyshopping.com/Category/Compaq-AC-Adapter/
http://www.ihappyshopping.com/Category/Dell-AC-Adapter/
http://www.ihappyshopping.com/Category/Delta-AC-Adapter/
http://www.ihappyshopping.com/category/Dell-AC-Adapter/Dell-PA-12-AC-Adapter.html
http://www.ihappyshopping.com/category/Gateway-AC-Adapter/Original-Gateway-PA-1700-02-AC-Adapter.html
http://www.ihappyshopping.com/category/Dell-AC-Adapter/Dell-Inspiron-1501-AC-Adapter-19.5V-4.62A.html
http://www.ihappyshopping.com/category/LCD-AC-Adapter/Dell-1503FP-LCD-AC-Adapter.html
http://www.ihappyshopping.com/category/Toshiba-AC-Adapter/Original-Toshiba-PA3467U-1ACA-AC-Adapter.html
http://www.ihappyshopping.com/category/Dell-AC-Adapter/Dell-Inspiron-E1505-AC-Adapter-19.5V-4.62A.html
http://www.ihappyshopping.com/category/Gateway-AC-Adapter/Original-Gateway-API3AD03-AC-Adapter.html
http://www.ihappyshopping.com/category/Gateway-AC-Adapter/Original-Gateway-0225C1965-AC-Adapter.html
http://www.ihappyshopping.com/category/Gateway-AC-Adapter/Original-Gateway-SADP-65KB-AC-Adapter.html
http://www.ihappyshopping.com/category/Dell-AC-Adapter/Dell-PA-9-AC-Adapter.html
http://www.ihappyshopping.com/Category/Gateway-AC-Adapter/
http://www.ihappyshopping.com/Category/HP-AC-Adapter/
http://www.ihappyshopping.com/Category/Liteon-AC-Adapter/
http://www.ihappyshopping.com/Category/Compaq-Keyboard/
http://www.ihappyshopping.com/Category/Dell-Keyboard/
http://www.ihappyshopping.com/Category/Gateway-Keyboard/
http://www.ihappyshopping.com/Category/HP-Keyboard/
http://www.ihappyshopping.com/Category/Toshiba-Keyboard/
http://www.ihappyshopping.com/Category/Apple-Battery/
http://www.ihappyshopping.com/Category/Dell-Battery/
http://www.ihappyshopping.com/Category/HP-Battery/
http://www.ihappyshopping.com/Category/Toshiba-Battery/
Posted by elen on July 15, 2009 at 03:56 PM CST #
http://www.laptopspartstore.com/
http://www.laptopspartstore.com/Productlist.html?CatID=200217206
http://www.laptopspartstore.com/Productlist.html?CatID=200217203
http://www.laptopspartstore.com/Productlist.html?CatID=200217204
http://www.laptopspartstore.com/Productlist.html?CatID=200217207
http://www.laptopspartstore.com/Productlist.html?CatID=200217232
http://www.laptopspartstore.com/Productlist.html?CatID=200217265
http://www.laptopspartstore.com/Productlist.html?CatID=200217260
http://www.laptopspartstore.com/Productlist.html?CatID=200217249
http://www.laptopspartstore.com/Productlist.html?CatID=200217251
http://www.laptopspartstore.com/Productlist.html?CatID=200217253
http://www.laptopspartstore.com/Productlist.html?CatID=200217280
http://www.laptopspartstore.com/Productlist.html?CatID=200217277
http://www.laptopspartstore.com/Productlist.html?CatID=200217236
http://www.laptopspartstore.com/Productlist.html?CatID=200217238
http://www.laptopspartstore.com/Productlist.html?CatID=200217239
http://www.laptopspartstore.com/Productlist.html?CatID=200217242
http://www.laptopspartstore.com/products/645637.html
http://www.laptopspartstore.com/products/645691.html
http://www.laptopspartstore.com/products/636876.html
http://www.laptopspartstore.com/products/637325.html
http://www.laptopspartstore.com/products/640031.html
http://www.laptopspartstore.com/products/637201.html
http://www.laptopspartstore.com/products/645255.html
http://www.laptopspartstore.com/products/640150.html
http://www.laptopspartstore.com/products/694418.html
http://www.laptopspartstore.com/products/694417.html
http://www.laptopspartstore.com/products/694409.html
http://www.laptopspartstore.com/products/694393.html
http://www.laptopspartstore.com/products/694392.html
http://www.laptopspartstore.com/products/694382.html
http://www.laptopspartstore.com/products/694379.html
http://www.laptopspartstore.com/products/694373.html
http://www.laptopspartstore.com/products/694370.html
http://www.laptopspartstore.com/products/694367.html
http://www.laptopspartstore.com/products/694355.html
http://www.laptopspartstore.com/products/694127.html
http://www.laptopspartstore.com/products/694111.html
http://www.laptopspartstore.com/products/694102.html
http://www.laptopspartstore.com/products/694089.html
http://www.laptopspartstore.com/products/694005.html
http://www.laptopspartstore.com/products/694002.html
http://www.laptopspartstore.com/products/693940.html
http://www.laptopspartstore.com/products/693797.html
http://www.laptopspartstore.com/products/693790.html
Posted by lynn on July 15, 2009 at 04:00 PM CST #
http://www.0120128888.com/
http://www.wonder-up.net/
http://www.akasaka-hisyo.com/
http://www.ran-s.jp/
http://www.tokyo-living.com/jp.html
http://www.firstep.jp/
http://www.tb-k.com/
http://www.kw-ai.com/
Posted by aaaaaaaaaa on August 07, 2009 at 11:49 AM CST #