Skip to content

Commit

Permalink
bump version, merge branch 'devel'
Browse files Browse the repository at this point in the history
update dates
  • Loading branch information
casperdcl committed Jul 20, 2018
2 parents de1824a + 3e59056 commit 7934b01
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ matrix:
env: TOXENV=py26
- python: 2.7
env: TOXENV=py27
- python: 3.3
env: TOXENV=py33
- python: 3.4
env: TOXENV=py34
- python: 3.5
Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* files: *
MPLv2.0 2015-2018 (c) Casper da Costa-Luis
MPLv2.0 2016-2018 (c) Casper da Costa-Luis
[casperdcl](https://github.com/casperdcl).


Expand Down
19 changes: 16 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ On Ubuntu, the procedure would be:
$ sudo apt-get install bash-completion
$ # Install `git fame` completions
$ sudo cp git-fame_completion.bash /etc/bash_completion.d/
$ sudo wget \
https://raw.githubusercontent.com/casperdcl/git-fame/master/git-fame_completion.bash \
-O /etc/bash_completion.d/git-fame_completion.bash
followed by a terminal restart.

Expand Down Expand Up @@ -128,12 +130,14 @@ Documentation
Options:
-h, --help Print this help and exit.
-v, --version Print module version and exit.
--branch=<b> Branch or tag [default: HEAD].
--branch=<b> Branch or tag [default: HEAD] up to which to check.
--sort=<key> [default: loc]|commits|files.
--excl=<f> Excluded files (default: None).
In no-regex mode, may be a comma-separated list.
Escape (\,) for a literal comma (may require \\, in shell).
--incl=<f> Included files [default: .*]. See `--excl` for format.
--since=<date> Date from which to check. Can be absoulte (eg: 1970-01-31)
or relative to now (eg: 3.weeks).
-n, --no-regex Assume <f> are comma-separated exact matches
rather than regular expressions [default: False].
NB: if regex is enabled `,` is equivalent to `|`.
Expand All @@ -147,12 +151,21 @@ Documentation
--log=<lvl> FATAL|CRITICAL|ERROR|WARN(ING)|[default: INFO]|DEBUG|NOTSET.
Changelog
---------
The list of all changes is available either on
`Github's Releases <https://github.com/casperdcl/git-fame/releases>`__
or on crawlers such as
`allmychanges.com <https://allmychanges.com/p/python/git-fame/>`__.
Licence
-------
Open Source (OSI approved): |LICENCE|
Copyright (c) 2016-8 Casper da Costa-Luis.
Copyright (c) 2016-2018 Casper da Costa-Luis.
This Source Code Form is subject to the terms of the
Mozilla Public License, v. 2.0.
Expand Down
10 changes: 8 additions & 2 deletions git-fame.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 1.19.2.1
.\"
.TH "GIT\-FAME" "1" "2017\-2018" "git\-fame User Manuals" ""
.TH "GIT\-FAME" "1" "2016\-2018" "git\-fame User Manuals" ""
.hy
.SH NAME
.PP
Expand Down Expand Up @@ -86,7 +86,13 @@ See \f[C]\-\-excl\f[] for format.
.RE
.TP
.B \-\-branch=\f[I]b\f[]
Branch or tag [default: HEAD].
Branch or tag [default: HEAD] up to which to check.
.RS
.RE
.TP
.B \-\-since=\f[I]date\f[]
Date from which to check.
Can be absoulte (eg: 1970\-01\-31) or relative to now (eg: 3.weeks).
.RS
.RE
.TP
Expand Down
2 changes: 1 addition & 1 deletion git-fame.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
% GIT-FAME(1) git-fame User Manuals
% Casper da Costa-Luis <https://github.com/casperdcl>
% 2017-2018
% 2016-2018

# NAME

Expand Down
15 changes: 10 additions & 5 deletions gitfame/_gitfame.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
Options:
-h, --help Print this help and exit.
-v, --version Print module version and exit.
--branch=<b> Branch or tag [default: HEAD].
--branch=<b> Branch or tag [default: HEAD] up to which to check.
--sort=<key> [default: loc]|commits|files.
--excl=<f> Excluded files (default: None).
In no-regex mode, may be a comma-separated list.
Escape (\,) for a literal comma (may require \\, in shell).
--incl=<f> Included files [default: .*]. See `--excl` for format.
--since=<date> Date from which to check. Can be absoulte (eg: 1970-01-31)
or relative to now (eg: 3.weeks).
-n, --no-regex Assume <f> are comma-separated exact matches
rather than regular expressions [default: False].
NB: if regex is enabled `,` is equivalent to `|`.
Expand Down Expand Up @@ -43,7 +45,7 @@
from ._version import __version__ # NOQA

__author__ = "Casper da Costa-Luis <casper@caspersci.uk.to>"
__date__ = "2016-7"
__date__ = "2016-2018"
__licence__ = "[MPLv2.0](https://mozilla.org/MPL/2.0/)"
__all__ = ["main"]
__copyright__ = ' '.join(("Copyright (c)", __date__, __author__, __licence__))
Expand All @@ -54,7 +56,7 @@
# finds all non-escaped commas
# NB: does not support escaping of escaped character
RE_CSPILT = re.compile(r'(?<!\\),')
RE_NCOM_AUTH_EM = re.compile(r'^\s*(\d+)\s+(.*)\s+<(.*)>\s*$', flags=re.M)
RE_NCOM_AUTH_EM = re.compile(r'^\s*(\d+)\s+(.*?)\s+<(.*)>\s*$', flags=re.M)


def tr_hline(col_widths, hl='-', x='+'):
Expand Down Expand Up @@ -184,6 +186,7 @@ def run(args):
# ! iterating over files

branch = args.branch
since = ["--since", args.since] if args.since else []
git_cmd = ["git", "-C", gitdir]
log.debug("base command:" + ' '.join(git_cmd))
file_list = check_output(
Expand All @@ -201,7 +204,8 @@ def run(args):
auth_stats = {}
for fname in tqdm(file_list, desc="Blame", disable=args.silent_progress,
unit="file"):
git_blame_cmd = git_cmd + ["blame", "--line-porcelain", branch, fname]
git_blame_cmd = git_cmd + ["blame", "--porcelain", branch, fname] + \
since
if args.ignore_whitespace:
git_blame_cmd.append("-w")
if args.M:
Expand Down Expand Up @@ -233,7 +237,8 @@ def run(args):
auth_stats[auth][fext_key] = 1

log.log(logging.NOTSET, "authors:" + '; '.join(auth_stats.keys()))
auth_commits = check_output(git_cmd + ["shortlog", "-s", "-e", branch])
auth_commits = check_output(
git_cmd + ["shortlog", "-s", "-e", branch] + since)
it_val_as = getattr(auth_stats, 'itervalues', auth_stats.values)
for stats in it_val_as():
stats.setdefault("commits", 0)
Expand Down
2 changes: 1 addition & 1 deletion gitfame/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def write(cls, msg, end='\n'):
sys.stderr.write(msg + end)

__author__ = "Casper da Costa-Luis <casper@caspersci.uk.to>"
__date__ = "2016"
__date__ = "2016-2018"
__licence__ = "[MPLv2.0](https://mozilla.org/MPL/2.0/)"
__all__ = ["TERM_WIDTH", "int_cast_or_len", "Max", "fext", "_str", "tqdm",
"tighten", "check_output", "print_unicode"]
Expand Down
2 changes: 1 addition & 1 deletion gitfame/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__all__ = ["__version__"]

# major, minor, patch, -extra
version_info = 1, 4, 2
version_info = 1, 5, 0

# Nice string for the version
__version__ = '.'.join(map(str, version_info))
Expand Down

0 comments on commit 7934b01

Please sign in to comment.