This module provides some useful tools for vcs like annotate/diff html output. It also includes some internal helpers.
Public API
Private API
Returns html portion containing annotated table with 3 columns: line numbers, changeset information and pygmentized line of code.
Parameters: |
|
---|
Give it a unified diff and it returns a list of the files that were mentioned in the diff together with a dict of meta information that can be used to render it in a HTML template.
Parameters: |
|
---|
Return udiff as html table with customized css classes
make a fresh copy of generator, we should not iterate thru an original as it’s needed for repeating operations on this instance of DiffProcessor
Prepare the passed udiff for HTML rendering. It’l return a list of dicts
Returns raw string as udiff
Returns mercurial style git diff between given filenode_old and filenode_new.
Returns unified diff between given filenode_old and filenode_new.
Decorator for easier creation of property from potentially expensive to calculate attribute of the class.
Usage:
class Foo(object):
@LazyProperty
def bar(self):
print 'Calculating self._bar'
return 42
Taken from http://blog.pythonisito.com/2008/08/lazy-descriptors.html and used widely.