mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-09-18 22:11:29 +02:00
f20c3c1895
The gettext.install() functions supplies a way to force it to return unicode which helps with compatibility between Python 2 & 3. To make it work properly when merging those returned string with strings in the different modules of gitinspector we also had to do some changes to make sure all string literals are in unicode.
52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
#!/usr/bin/python
|
|
# coding: utf-8
|
|
#
|
|
# Copyright © 2012-2013 Ejwa Software. All rights reserved.
|
|
#
|
|
# This file is part of gitinspector.
|
|
#
|
|
# gitinspector is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# gitinspector is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with gitinspector. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
__since__ = ""
|
|
|
|
__until__ = ""
|
|
|
|
__ref__ = "HEAD"
|
|
|
|
def has_interval():
|
|
return __since__ + __until__ != ""
|
|
|
|
def get_since():
|
|
return __since__
|
|
|
|
def set_since(since):
|
|
global __since__
|
|
__since__ = "--since=\"" + since + "\" "
|
|
|
|
def get_until():
|
|
return __until__
|
|
|
|
def set_until(until):
|
|
global __until__
|
|
__until__ = "--until=\"" + until + "\" "
|
|
|
|
def get_ref():
|
|
return __ref__
|
|
|
|
def set_ref(ref):
|
|
global __ref__
|
|
__ref__ = ref
|