changeset 2197:5de8b44f0446

define standard name for base url to use when printing hgweb urls. useful for bugzilla integration, email notifications, other stuffs.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Thu, 04 May 2006 11:32:00 -0700
parents 2a5d8af8eecc
children 564034552f7f
files doc/hgrc.5.txt hgext/bugzilla.py
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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".
--- 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]))