Skip to content

Commit

Permalink
Don't show again last log message
Browse files Browse the repository at this point in the history
  • Loading branch information
tobami committed Dec 29, 2010
1 parent f8efad1 commit 0441c47
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion speedcenter/codespeed/mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ def getlogs(endrev, startrev):
commitid, author, date, message = ("","","","")
elements = []
elements = log.split('\n')[:-1]
if not len(elements) or len(elements) < 4:
if len(elements) < 4:
# Don't save "malformed" log
continue
else:
commitid = elements.pop(0)
author = elements.pop(0)
date = elements.pop(0)
# All other newlines should belong to the description text. Join.
message = '\n'.join(elements)

# Parse date
Expand All @@ -56,4 +58,7 @@ def getlogs(endrev, startrev):
# Add changeset info
logs.append({'date': date, 'author': author, 'message': message,
'commitid': commitid})
# Remove last log because the startrev log shouldn't be shown
if len(logs) > 1:
print logs.pop()
return logs

0 comments on commit 0441c47

Please sign in to comment.