Skip to content

Commit

Permalink
bump version, merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jun 10, 2020
2 parents fd9c79c + 86418b9 commit 82bf1c7
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: py3.7
python: 3.7
env: TOXENV=py37
- name: py3.8
python: 3.8
env: TOXENV=py38
- name: pypy2.7
python: pypy
env: TOXENV=pypy
Expand Down Expand Up @@ -133,18 +136,24 @@ jobs:
- name: snapcraft
channel: stable
confinement: classic
- name: review-tools
channel: stable
- name: lxd
channel: stable
env:
- SNAPCRAFT_IMAGE_INFO: '{"build_url": "$TRAVIS_BUILD_URL"}'
- SNAPCRAFT_IMAGE_INFO: |
'{"build_url": "$TRAVIS_JOB_WEB_URL"}'
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
- SNAPCRAFT_BUILD_INFO: 1 # https://snapcraft.io/blog/introducing-developer-notifications-for-snap-security-updates
before_install:
- sudo usermod --append --groups lxd $USER
- sudo /snap/bin/lxd.migrate -yes
- sudo /snap/bin/lxd waitready
- sudo /snap/bin/lxd init --auto
install:
- make snapcraft.yaml
script:
- sudo snapcraft --use-lxd
- sg lxd -c snapcraft
after_failure:
- sudo journalctl -u snapd
deploy:
Expand Down
17 changes: 16 additions & 1 deletion gitfame/_gitfame.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
# 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)
# finds "boundary" line-porcelain messages
RE_BLAME_BOUNDS = re.compile(
r'^\w+\s+\d+\s+\d+(\s+\d+)?\s*$[^\t]*?^boundary\s*$[^\t]*?^\t.*?$\r?\n',
flags=re.M | re.DOTALL)


def hours(dates, maxCommitDiffInSec=120 * 60, firstCommitAdditionInMinutes=120):
Expand Down Expand Up @@ -220,6 +224,10 @@ def _get_auth_stats(
getattr(log, "warn" if warn_binary else "debug")(fname + ':' + str(e))
continue
log.log(logging.NOTSET, blame_out)

# Strip boundary messages,
# preventing user with nearest commit to boundary owning the LOC
blame_out = RE_BLAME_BOUNDS.sub('', blame_out)
loc_auth_times = RE_AUTHS.findall(blame_out)

for loc, auth, tstamp in loc_auth_times: # for each chunk
Expand Down Expand Up @@ -265,7 +273,14 @@ def _get_auth_stats(
old = auth_stats
auth_stats = {}
for auth, stats in getattr(old, 'iteritems', old.items)():
auth_stats[auth2em[auth]] = stats
i = auth_stats.setdefault(auth2em[auth], {"loc": 0,
"files": set([]),
"commits": 0,
"ctimes": []})
i["loc"] += stats["loc"]
i["files"].update(stats["files"])
i["commits"] += stats["commits"]
i["ctimes"] += stats["ctimes"]
del old

return auth_stats
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, 11, 1
version_info = 1, 12, 0

# Nice string for the version
__version__ = '.'.join(map(str, version_info))
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def cythonize(*args, **kwargs):
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: IronPython',
'Programming Language :: Python :: Implementation :: PyPy',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[tox]
# deprecation warning: py{26,32,33,34}
envlist = py{26,27,33,34,35,36,37,py,py3}, flake8, setup.py, nodeps
envlist = py{26,27,33,34,35,36,37,38,py,py3}, flake8, setup.py, nodeps

[core]
deps =
Expand Down

0 comments on commit 82bf1c7

Please sign in to comment.