-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyc

ó
¹àíNc@@sªddlmZddlmZddlmZeeƒdƒdZd„Zdej	fd„ƒYZ
e
ƒZd	efd
„ƒYZ
de
fd„ƒYZd
efd„ƒYZejdeddƒƒejdeddƒƒejdeddƒƒde
fd„ƒYZdeefd„ƒYZejdeddƒƒejdeddƒƒdefd „ƒYZejd!eƒƒd"ZeegƒZd#„Zd$S(%i(tabsolute_import(tregistry(tlazy_imports%
from bzrlib import errors, urlutils
s‘When making a commit, metadata about bugs fixed by that change can be
recorded by using the ``--fixes`` option. For each bug marked as fixed, an
entry is included in the 'bugs' revision property stating '<url> <status>'.
(The only ``status`` value currently supported is ``fixed.``)

The ``--fixes`` option allows you to specify a bug tracker and a bug identifier
rather than a full URL. This looks like::

    bzr commit --fixes <tracker>:<id>

or::

    bzr commit --fixes <id>

where "<tracker>" is an identifier for the bug tracker, and "<id>" is the
identifier for that bug within the bugtracker, usually the bug number.
If "<tracker>" is not specified the ``bugtracker`` set in the branch
or global configuration is used.

Bazaar knows about a few bug trackers that have many users. If
you use one of these bug trackers then there is no setup required to
use this feature, you just need to know the tracker identifier to use.
These are the bugtrackers that are built in:

  ============================ ============ ============
  URL                          Abbreviation Example
  ============================ ============ ============
  https://bugs.launchpad.net/  lp           lp:12345
  http://bugs.debian.org/      deb          deb:12345
  http://bugzilla.gnome.org/   gnome        gnome:12345
  ============================ ============ ============

For the bug trackers not listed above configuration is required.
Support for generating the URLs for any project using Bugzilla or Trac
is built in, along with a template mechanism for other bugtrackers with
simple URL schemes. If your bug tracker can't be described by one
of the schemes described below then you can write a plugin to support
it.

If you use Bugzilla or Trac, then you only need to set a configuration
variable which contains the base URL of the bug tracker. These options
can go into ``bazaar.conf``, ``branch.conf`` or into a branch-specific
configuration section in ``locations.conf``.  You can set up these values
for each of the projects you work on.

Note: As you provide a short name for each tracker, you can specify one or
more bugs in one or more trackers at commit time if you wish.

Launchpad
---------

Use ``bzr commit --fixes lp:2`` to record that this commit fixes bug 2.

bugzilla_<tracker>_url
----------------------

If present, the location of the Bugzilla bug tracker referred to by
<tracker>. This option can then be used together with ``bzr commit
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
example::

    bugzilla_squid_url = http://bugs.squid-cache.org

would allow ``bzr commit --fixes squid:1234`` to mark Squid's bug 1234 as
fixed.

trac_<tracker>_url
------------------

If present, the location of the Trac instance referred to by
<tracker>. This option can then be used together with ``bzr commit
--fixes`` to mark bugs in that tracker as being fixed by that commit. For
example::

    trac_twisted_url = http://www.twistedmatrix.com/trac

would allow ``bzr commit --fixes twisted:1234`` to mark Twisted's bug 1234 as
fixed.

bugtracker_<tracker>_url
------------------------

If present, the location of a generic bug tracker instance referred to by
<tracker>. The location must contain an ``{id}`` placeholder,
which will be replaced by a specific bug ID. This option can then be used
together with ``bzr commit --fixes`` to mark bugs in that tracker as being
fixed by that commit. For example::

    bugtracker_python_url = http://bugs.python.org/issue{id}

would allow ``bzr commit --fixes python:1234`` to mark bug 1234 in Python's
Roundup bug tracker as fixed, or::

    bugtracker_cpan_url = http://rt.cpan.org/Public/Bug/Display.html?id={id}

would allow ``bzr commit --fixes cpan:1234`` to mark bug 1234 in CPAN's
RT bug tracker as fixed, or::

    bugtracker_hudson_url = http://issues.hudson-ci.org/browse/{id}

would allow ``bzr commit --fixes hudson:HUDSON-1234`` to mark bug HUDSON-1234
in Hudson's JIRA bug tracker as fixed.
cC@stj||ƒ}|j|ƒS(s[Return a URL pointing to the canonical web page of the bug identified by
    'bug_id'.
    (ttracker_registrytget_trackertget_bug_url(tabbreviated_bugtracker_nametbranchtbug_idttracker((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR”stTrackerRegistrycB@s eZdZd„Zd„ZRS(sRegistry of bug tracker types.cC@s^xE|jƒD]7}|j|ƒ}|j||ƒ}|dk	r
|Sq
Wtj||ƒ‚dS(sšReturn the first registered tracker that understands
        'abbreviated_bugtracker_name'.

        If no such tracker is found, raise KeyError.
        N(tkeystgettNoneterrorstUnknownBugTrackerAbbreviation(tselfRRttracker_namettracker_typeR	((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRŸs	cC@stS(N(t
_bugs_help(Rttopic((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyt
help_topic­s(t__name__t
__module__t__doc__RR(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR
œs	t
BugTrackercB@s)eZdZd„Zd„Zd„ZRS(sBase class for bug trackers.cC@sdS(smCheck that the bug_id is valid.

        The base implementation assumes that all bug_ids are valid.
        N((RR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pytcheck_bug_id¸scC@s|j|ƒ|j|ƒS(sAReturn the URL for bug_id. Raise an error if bug ID is malformed.(Rt_get_bug_url(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR¾s
cC@sdS(s:Given a validated bug_id, return the bug's web page's URL.N((RR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRÃs(RRRRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRµs		tIntegerBugTrackercB@seZdZd„ZRS(s/A bug tracker that only allows integer bug IDs.cC@s8yt|ƒWn#tk
r3tj|dƒ‚nXdS(NsMust be an integer(tintt
ValueErrorRtMalformedBugIdentifier(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRÊs
(RRRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRÇstUniqueIntegerBugTrackercB@s)eZdZd„Zd„Zd„ZRS(sA style of bug tracker that exists in one place only, such as Launchpad.

    If you have one of these trackers then register an instance passing in an
    abbreviated name for the bug tracker and a base URL. The bug ids are
    appended directly to the URL.
    cC@s||_||_dS(N(tabbreviationtbase_url(RRR"((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyt__init__Ùs	cC@s||jkrdS|S(sPReturns the tracker if the abbreviation matches. Returns None
        otherwise.N(R!R
(RRR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRÝscC@s|j|S(sReturn the URL for bug_id.(R"(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRäs(RRRR#RR(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR Ñs		t	launchpadtlpshttps://launchpad.net/bugs/tdebiantdebshttp://bugs.debian.org/tgnomes*http://bugzilla.gnome.org/show_bug.cgi?id=tURLParametrizedBugTrackercB@s)eZdZd„Zd„Zd„ZRS(sFA type of bug tracker that can be found on a variety of different sites,
    and thus needs to have the base URL configured.

    Looks for a config setting in the form '<type_name>_<abbreviation>_url'.
    `type_name` is the name of the type of tracker and `abbreviation`
    is a short name for the particular instance.
    cC@sK|jƒ}|jd|j|fdtƒ}|dkr>dS||_|S(Ns	%s_%s_urltexpand(t
get_configtget_user_optiont	type_nametFalseR
t	_base_url(RR!Rtconfigturl((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRÿs	cC@s||_||_dS(N(R-t	_bug_area(RR-tbug_area((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR#s	cC@s tj|j|jƒt|ƒS(s-Return a URL for a bug on this Trac instance.(turlutilstjoinR/R2tstr(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyRs(RRRRR#R(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR)ös			t URLParametrizedIntegerBugTrackercB@seZdZRS(s©A type of bug tracker that  only allows integer bug IDs.

    This can be found on a variety of different sites, and thus needs to have
    the base URL configured.

    Looks for a config setting in the form '<type_name>_<abbreviation>_url'.
    `type_name` is the name of the type of tracker (e.g. 'bugzilla' or 'trac')
    and `abbreviation` is a short name for the particular instance (e.g.
    'squid' or 'apache').
    (RRR(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR7sttracsticket/tbugzillasshow_bug.cgi?id=tGenericBugTrackercB@s)eZdZd„Zd„Zd„ZRS(s1Generic bug tracker specified by an URL template.cC@stt|ƒjddƒdS(Nt
bugtracker(tsuperR:R#R
(R((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR#)scC@s"||_tt|ƒj||ƒS(N(t
_abbreviationR<R:R(RR!R((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR,s	cC@sCd|jkr*tj|j|jƒ‚n|jjdt|ƒƒS(s:Given a validated bug_id, return the bug's web page's URL.s{id}(R/RtInvalidBugTrackerURLR=treplaceR6(RR((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR0s(RRRR#RR(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyR:&s		tgenerictfixedcC@sdjd„|DƒƒS(sGet the revision property value for a commit that fixes bugs.

    :param bug_urls: An iterable of escaped URLs to bugs. These normally
        come from `get_bug_url`.
    :return: A string that will be set as the 'bugs' property of a revision
        as part of a commit.
    s
cs@s|]}d|tfVqdS(s%s %sN(tFIXED(t.0R1((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pys	<genexpr>Hs(R5(tbug_urls((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pytencode_fixes_bug_urls@sN(t
__future__RtbzrlibRtbzrlib.lazy_importRtglobalsRRtRegistryR
RtobjectRRR tregisterR)R7R:RBtsettALLOWED_BUG_STATUSESRE(((s5/usr/lib/python2.7/dist-packages/bzrlib/bugtracker.pyt<module>s>	z		
	


Copyright © 2017 || Recoded By Mr.Bumblebee