@@ -50,7 +50,7 @@ def getlogs(endrev, startrev):
5050
5151 cmd = ["hg" , "log" ,
5252 "-r" , "%s::%s" % (startrev .commitid , endrev .commitid ),
53- "--template" , "{rev}:{node|short}\n {node}\n {author|user}\n {author|email}\n {date}\n {desc}\n =newlog=\n " ]
53+ "--template" , "{rev}:{node|short}\n {node}\n {author|user}\n {author|email}\n {date}\n {tags} \n { desc}\n =newlog=\n " ]
5454
5555 working_copy = endrev .branch .project .working_copy
5656 p = Popen (cmd , stdout = PIPE , stderr = PIPE , cwd = working_copy )
@@ -64,7 +64,7 @@ def getlogs(endrev, startrev):
6464 for log in stdout .split ("=newlog=\n " ):
6565 elements = []
6666 elements = log .split ('\n ' )[:- 1 ]
67- if len (elements ) < 6 :
67+ if len (elements ) < 7 :
6868 # "Malformed" log
6969 logs .append (
7070 {'date' : '-' , 'message' : 'error parsing log' , 'commitid' : '-' })
@@ -74,6 +74,8 @@ def getlogs(endrev, startrev):
7474 author_name = elements .pop (0 )
7575 author_email = elements .pop (0 )
7676 date = elements .pop (0 )
77+ tag = elements .pop (0 )
78+ tag = "" if tag == "tip" else tag
7779 # All other newlines should belong to the description text. Join.
7880 message = '\n ' .join (elements )
7981
@@ -85,7 +87,7 @@ def getlogs(endrev, startrev):
8587 logs .append ({
8688 'date' : date , 'author' : author_name ,
8789 'author_email' : author_email , 'message' : message ,
88- 'short_commit_id' : short_commit_id , 'commitid' : commit_id })
90+ 'short_commit_id' : short_commit_id , 'commitid' : commit_id , 'tag' : tag })
8991 # Remove last log here because mercurial saves the short hast as commitid now
9092 if len (logs ) > 1 and logs [- 1 ].get ('short_commit_id' ) == startrev .commitid :
9193 logs .pop ()
0 commit comments