hgext/bugzilla.py
changeset 13870 ce066d424bba
parent 13854 5ed036e42fd9
child 13871 22d200e49b10
equal deleted inserted replaced
13869:b470894c33f8 13870:ce066d424bba
   174 Example configurations:
   174 Example configurations:
   175 
   175 
   176 XMLRPC example configuration. This uses the Bugzilla at
   176 XMLRPC example configuration. This uses the Bugzilla at
   177 ``http://my-project.org/bugzilla``, logging in as user
   177 ``http://my-project.org/bugzilla``, logging in as user
   178 ``bugmail@my-project.org`` with password ``plugh``. It is used with a
   178 ``bugmail@my-project.org`` with password ``plugh``. It is used with a
   179 collection of Mercurial repositories in ``/var/local/hg/repos/``. ::
   179 collection of Mercurial repositories in ``/var/local/hg/repos/``,
       
   180 with a web interface at ``http://my-project.org/hg``. ::
   180 
   181 
   181     [bugzilla]
   182     [bugzilla]
   182     bzurl=http://my-project.org/bugzilla
   183     bzurl=http://my-project.org/bugzilla
   183     user=bugmail@my-project.org
   184     user=bugmail@my-project.org
   184     password=plugh
   185     password=plugh
   185     version=xmlrpc
   186     version=xmlrpc
       
   187     template=Changeset {node|short} in {root|basename}.
       
   188              {hgweb}/{webroot}/rev/{node|short}\\n
       
   189              {desc}\\n
       
   190     strip=5
   186 
   191 
   187     [web]
   192     [web]
   188     baseurl=http://my-project.org/hg
   193     baseurl=http://my-project.org/hg
   189 
   194 
   190 XMLRPC+email example configuration. This uses the Bugzilla at
   195 XMLRPC+email example configuration. This uses the Bugzilla at
   191 ``http://my-project.org/bugzilla``, logging in as user
   196 ``http://my-project.org/bugzilla``, logging in as user
   192 ``bugmail@my-project.org`` wityh password ``plugh``. It is used with a
   197 ``bugmail@my-project.org`` wityh password ``plugh``. It is used with a
   193 collection of Mercurial repositories in ``/var/local/hg/repos/``. Bug
   198 collection of Mercurial repositories in ``/var/local/hg/repos/``,
   194 comments are sent to the Bugzilla email address
   199 with a web interface at ``http://my-project.org/hg``. Bug comments
       
   200 are sent to the Bugzilla email address
   195 ``bugzilla@my-project.org``. ::
   201 ``bugzilla@my-project.org``. ::
   196 
   202 
   197     [bugzilla]
   203     [bugzilla]
       
   204     bzurl=http://my-project.org/bugzilla
   198     user=bugmail@my-project.org
   205     user=bugmail@my-project.org
   199     password=plugh
   206     password=plugh
   200     version=xmlrpc
   207     version=xmlrpc
   201     bzemail=bugzilla@my-project.org
   208     bzemail=bugzilla@my-project.org
       
   209     template=Changeset {node|short} in {root|basename}.
       
   210              {hgweb}/{webroot}/rev/{node|short}\\n
       
   211              {desc}\\n
       
   212     strip=5
   202 
   213 
   203     [web]
   214     [web]
   204     baseurl=https://dev.laicatc.com/hg
   215     baseurl=http://my-project.org/hg
   205     bugzillaurl=https://dev.laicatc.com/bugzilla
   216 
   206 
   217     [usermap]
   207 MySQL example configuration. This is for a collection of Mercurial
   218     user@emaildomain.com=user.name@bugzilladomain.com
   208 repositories in ``/var/local/hg/repos/`` used with a local Bugzilla
   219 
   209 3.2 installation in /opt/bugzilla-3.2. The MySQL database is on
   220 MySQL example configuration. This has a local Bugzilla 3.2 installation
   210 ``localhost``, the Bugzilla database name is ``bugs`` and MySQL is
   221 in ``/opt/bugzilla-3.2``. The MySQL database is on ``localhost``,
   211 accessed with MySQL username ``bugs`` password ``XYZZY``. ::
   222 the Bugzilla database name is ``bugs`` and MySQL is
       
   223 accessed with MySQL username ``bugs`` password ``XYZZY``. It is used
       
   224 with a collection of Mercurial repositories in ``/var/local/hg/repos/``,
       
   225 with a web interface at ``http://my-project.org/hg``. ::
   212 
   226 
   213     [bugzilla]
   227     [bugzilla]
   214     host=localhost
   228     host=localhost
   215     password=XYZZY
   229     password=XYZZY
   216     version=3.0
   230     version=3.0
   220              {hgweb}/{webroot}/rev/{node|short}\\n
   234              {hgweb}/{webroot}/rev/{node|short}\\n
   221              {desc}\\n
   235              {desc}\\n
   222     strip=5
   236     strip=5
   223 
   237 
   224     [web]
   238     [web]
   225     baseurl=http://dev.domain.com/hg
   239     baseurl=http://my-project.org/hg
   226 
   240 
   227     [usermap]
   241     [usermap]
   228     user@emaildomain.com=user.name@bugzilladomain.com
   242     user@emaildomain.com=user.name@bugzilladomain.com
   229 
   243 
   230 All the above add a comment to the Bugzilla bug record of the form::
   244 All the above add a comment to the Bugzilla bug record of the form::
   231 
   245 
   232     Changeset 3b16791d6642 in repository-name.
   246     Changeset 3b16791d6642 in repository-name.
   233     http://dev.domain.com/hg/repository-name/rev/3b16791d6642
   247     http://my-project.org/hg/repository-name/rev/3b16791d6642
   234 
   248 
   235     Changeset commit comment. Bug 1234.
   249     Changeset commit comment. Bug 1234.
   236 '''
   250 '''
   237 
   251 
   238 from mercurial.i18n import _
   252 from mercurial.i18n import _