Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Release 0.4.1:

- Bug fixes (in diff and PyPI setup).
  • Loading branch information
spderosso committed Dec 6, 2013
2 parents 27da18a + fcb74c5 commit 989b853
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include README.md LICENSE.md
9 changes: 8 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
Gitpylib's Release Notes
========================


6th Dec 2013 - 0.4.1
--------------------

* Bug fixes (in diff and PyPI setup).


23rd Nov 2013 - 0.4
-------------------

* machine-friendly output of diff command.
* Machine-friendly output of diff command.


(No notes for previous releases)
11 changes: 6 additions & 5 deletions gitpylib/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,14 @@ def _process_diff_output(diff_out):

for line in diff_out:
# @@ -(start of old),(length of old) +(start of new),(length of new) @@
new_hunk_regex = "^@@ -([0-9]+),([0-9]+) \+([0-9]+),([0-9]+) @@"
new_hunk_regex = "^@@ -([0-9]+)[,]?([0-9]*) \+([0-9]+)[,]?([0-9]*) @@"
new_hunk_info = re.search(new_hunk_regex, line)
if new_hunk_info:
old_line_number = int(new_hunk_info.group(1))
old_diff_length = int(new_hunk_info.group(2))
new_line_number = int(new_hunk_info.group(3))
new_diff_length = int(new_hunk_info.group(4))
get_info_or_zero = lambda g: 0 if g == '' else int(g)
old_line_number = get_info_or_zero(new_hunk_info.group(1))
old_diff_length = get_info_or_zero(new_hunk_info.group(2))
new_line_number = get_info_or_zero(new_hunk_info.group(3))
new_diff_length = get_info_or_zero(new_hunk_info.group(4))
resulting.append(
LineData(line, DIFF_INFO, old_line_number, new_line_number))
max_line_digits = max([old_line_number + old_diff_length,
Expand Down
19 changes: 9 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@

setup(
name='gitpylib',
version='0.4',
version='0.4.1',
description='A Python library for Git',
long_description=open('README.md').read(),
author='Santiago Perez De Rosso',
author_email='[email protected]',
url='http://github.com/spderosso/gitpylib',
url='http://github.com/sdg-mit/gitpylib',
packages=['gitpylib'],
license='GPLv2',
classifiers=(
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Natural Language :: English',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Version Control',
))
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Natural Language :: English',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Version Control'))

0 comments on commit 989b853

Please sign in to comment.