mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 08:38:26 +01:00
f4c3285cb8
This can now be done by supplying one (or both) of the "--since" and "--until" parameters to the gitinspector executable. These parameters work in the same manner as they do in git and accept the same values. Statistics will only be generated from data between the given interval.
49 lines
1.2 KiB
Python
49 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/>.
|
|
|
|
__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
|