forked from gera/gitzilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
61 lines (41 loc) · 1.34 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""
GitZilla
Git-Bugzilla integration in a Python module.
Requirements
------------
- Python (tested with 2.6, should work with >= 2.5)
- pybugz (tested with 0.8.0)
pybugs can be obtained from http://github.com/ColdWind/pybugz/downloads
"""
__version__ = '2.0'
__author__ = 'Devendra Gera <[email protected]>'
__license__ = """Copyright 2010, Devendra Gera <[email protected]>,
All rights reserved.
This is Free Software, released under the terms of the GNU General Public
License, version 3. A copy of the license can be obtained by emailing the
author, or from http://www.gnu.org/licenses/gpl-3.0.html
As noted in the License, this software does not come with any warranty,
explicit or implied, to the extent permissible by law.
This program might, and would be buggy. Use it at your own risk.
"""
sDefaultRefPrefix = 'refs/heads/'
sDefaultSeparator = "~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~."
sDefaultFormatSpec = """
commit %H
parent %P
Author %aN (%aE)
Date %aD
Commit By %cN (%cE)
Commit Date %cD
%s
%b
"""
import re
oDefaultBugRegex = re.compile(r"bug\s*(?:#|)\s*(?P<bug>\d+)",
re.MULTILINE | re.DOTALL | re.IGNORECASE)
import logging
class NullHandler(logging.Handler):
def emit(self, record):
pass
NullLogger = logging.getLogger("gitzilla")
NullLogger.addHandler(NullHandler())