Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pycvsanaly2/DBContentHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def commit(self, commit):
if action.type == 'A':
# A file has been added
file_id = self.__action_add(path, prefix, log)
elif action.type == 'M':
elif action.type == 'M' or action.type == 'T':
# A file has been modified
file_id = self.__get_file_for_path(path, log.id)[0]
elif action.type == 'D':
Expand Down
4 changes: 2 additions & 2 deletions pycvsanaly2/GitParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def set_tail(self, tail):
" \d{4}) ([+-]\d{4})$")
patterns['author-date'] = re.compile("^AuthorDate: (.* \d+ \d+:\d+:\d+" + \
" \d{4}) ([+-]\d{4})$")
patterns['file'] = re.compile("^([MAD])[ \t]+(.*)$")
patterns['file-moved'] = re.compile("^([RC])[0-9]+[ \t]+(.*)[ \t]+(.*)$")
patterns['file'] = re.compile("^[ACDMRTUXB]{0,1}([MADT])[ \t]+(.*)$")
patterns['file-moved'] = re.compile("^[ACDMRTUXB]{0,1}([RC])[0-9]+[ \t]+(.*)[ \t]+(.*)$")
patterns['branch'] = re.compile("refs/remotes/([^,]*)/([^,]*)")
patterns['local-branch'] = re.compile("refs/heads/([^,]*)")
patterns['tag'] = re.compile("tag: refs/tags/([^,]*)")
Expand Down
9 changes: 8 additions & 1 deletion pycvsanaly2/PatchParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import re
from pycvsanaly2.utils import printerr


binary_files_re = 'Binary files (.*) and (.*) differ\n'
Expand Down Expand Up @@ -410,7 +411,13 @@ def iter_file_patch(iter_lines, allow_dirty=False):
yield saved_lines
saved_lines = []
elif line.startswith('@@'):
hunk = hunk_from_header(line)
try:
hunk = hunk_from_header(line)
except MalformedHunkHeader, e:
if allow_dirty:
printerr("Error: MalformedHunkHeader; Probably merge commit. Skipping.")
continue
raise e
orig_range = hunk.orig_range
saved_lines.append(line)
if len(saved_lines) > 0:
Expand Down