# HG changeset patch # User Vadim Gelfer # Date 1146767520 25200 # Node ID 5de8b44f0446b7a37f8332f6e5be3f3c54e7ccee # Parent 2a5d8af8eecc3e2d558588e17184bb874278614f define standard name for base url to use when printing hgweb urls. useful for bugzilla integration, email notifications, other stuffs. diff -r 2a5d8af8eecc -r 5de8b44f0446 doc/hgrc.5.txt --- a/doc/hgrc.5.txt Thu May 04 14:05:44 2006 +0200 +++ b/doc/hgrc.5.txt Thu May 04 11:32:00 2006 -0700 @@ -300,6 +300,10 @@ allowzip;; Whether to allow .zip downloading of repo revisions. Default is false. This feature creates temporary files. + baseurl;; + Base URL to use when publishing URLs in other locations, so + third-party tools like email notification hooks can construct URLs. + Example: "http://hgserver/repos/" description;; Textual description of the repository's purpose or contents. Default is "unknown". diff -r 2a5d8af8eecc -r 5de8b44f0446 hgext/bugzilla.py --- a/hgext/bugzilla.py Thu May 04 14:05:44 2006 +0200 +++ b/hgext/bugzilla.py Thu May 04 11:32:00 2006 -0700 @@ -30,7 +30,6 @@ # OPTIONAL: # bzuser = ... # bugzilla user id to record comments with # db = bugs # database to connect to -# hgweb = http:// # root of hg web site for browsing commits # notify = ... # command to run to get bugzilla to send mail # regexp = ... # regexp to match bug ids (must contain one "()" group) # strip = 0 # number of slashes to strip for url paths @@ -38,6 +37,8 @@ # template = ... # template to use when formatting comments # timeout = 5 # database connection timeout (seconds) # user = bugs # user to connect to database as +# [web] +# baseurl = http://hgserver/... # root of hg web site for browsing commits from mercurial.demandload import * from mercurial.i18n import gettext as _ @@ -266,7 +267,7 @@ t.use_template(tmpl) t.show(changenode=node, changes=changes, bug=str(bugid), - hgweb=self.ui.config('bugzilla', 'hgweb'), + hgweb=self.ui.config('web', 'baseurl'), root=self.repo.root, webroot=webroot(self.repo.root)) self.add_comment(bugid, sio.getvalue(), templater.email(changes[1]))