define standard name for base url to use when printing hgweb urls.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Thu, 04 May 2006 11:32:00 -0700
changeset 2197 5de8b44f0446
parent 2196 2a5d8af8eecc
child 2198 564034552f7f
define standard name for base url to use when printing hgweb urls. useful for bugzilla integration, email notifications, other stuffs.
doc/hgrc.5.txt
hgext/bugzilla.py
--- 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]))