use short node instead of revision number

This commit is contained in:
Sebastian Sdorra
2011-09-22 20:35:43 +02:00
parent 979167a497
commit 00f8d8f124

View File

@@ -40,6 +40,7 @@ if len(pythonPath) > 0:
from mercurial import hg, ui, commands from mercurial import hg, ui, commands
from mercurial.node import hex
from xml.sax.saxutils import escape from xml.sax.saxutils import escape
import datetime, time import datetime, time
@@ -73,8 +74,7 @@ for line in lines:
c += 1 c += 1
print ' <blameline>' print ' <blameline>'
print ' <lineNumber>' + str(c) + '</lineNumber>' print ' <lineNumber>' + str(c) + '</lineNumber>'
# get revision id not the number print ' <revision>' + hex(ctx.node()[:6]) + '</revision>'
print ' <revision>' + str(ctx.rev()) + '</revision>'
print ' <when>' + str(time).split('.')[0] + '</when>' print ' <when>' + str(time).split('.')[0] + '</when>'
if authorName: if authorName:
print ' <author>' print ' <author>'