通知redmine 有新的changeset
apache
LoadModule wsgi_module modules/mod_wsgi.soWSGIScriptAlias /hgrepos "F:/hg_repos/hgweb/hgweb.wsgi"
hgweb.wsgi
# An example WSGI for use with mod_wsgi, edit as necessary# See http://mercurial.selenic.com/wiki/modwsgi for more information# Path to repo or hgweb config to serve (see 'hg help hgweb')config = "F:/hg_repos/hgweb/hgweb.config"# Uncomment and adjust if Mercurial is not installed system-wide# (consult "installed modules" path from 'hg debuginstall'):#import sys; sys.path.insert(0, "D:/Test/hglib")# Uncomment to send python tracebacks to the browser if an error occurs:import cgitb; cgitb.enable()# enable demandloading to reduce startup timefrom mercurial import demandimport; demandimport.enable()from mercurial.hgweb import hgwebapplication = hgweb(config)
hgweb.config
[paths] project = F:\hg_repos\project\*test = F:\hg_repos\test\*[web]allow_push = * push_ssl = falseencoding = UTF-8[hooks]changegroup.redmine = F:/hg_repos/hgweb/sync-redmine.batcommit.redmine = F:/hg_repos/hgweb/sync-redmine.bat
sync-redmine.bat
rem sync redmine reposity and ticket wgethttp://127.0.0.1:3000/sys/fetch_changesets?key=3eYuhBHOh5efg1NNeXkd
or put hgrc into each repo
[hooks]changegroup.redmine = F:/hg_repos/hgweb/sync-redmine.batcommit.redmine = F:/hg_repos/hgweb/sync-redmine.bat