Package svnmailer :: Module differ :: Class InternalDiffer
[show private | hide private]
[frames | no frames]

Class InternalDiffer

object --+
         |
        InternalDiffer


Differ without an external program call (uses difflib)
Method Summary
  __init__(self, tags)
Initialization
iterable getFileDiff(self, name1, name2, label1, label2, date1, date2)
creates a diff of two line based files
iterable getStringDiff(self, string1, string2, label1, label2, date1, date2)
creates a diff of two line based strings
generator _tags(self, list1, list2)
Returns diff tags
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...

Method Details

__init__(self, tags=False)
(Constructor)

Initialization
Parameters:
tags - Return diff opcodes instead of unified format?
           (type=bool)
Overrides:
__builtin__.object.__init__

getFileDiff(self, name1, name2, label1, label2=None, date1='', date2='')

creates a diff of two line based files
Parameters:
name1 - First file name
           (type=str)
name2 - Second file name
           (type=str)
label1 - Label for first data
           (type=str)
label2 - Label for second data
           (type=str)
date1 - Date description for first data
           (type=str)
date2 - Date description for second data
           (type=str)
Returns:
unified diff lines (maybe a generator)
           (type=iterable)

getStringDiff(self, string1, string2, label1, label2=None, date1='', date2='')

creates a diff of two line based strings

If a string is None, it's treated empty

Parameters:
string1 - First string
           (type=str)
string2 - Second string
           (type=str)
label1 - Label for first data
           (type=str)
label2 - Label for second data
           (type=str)
date1 - Date description for first data
           (type=str)
date2 - Date description for second data
           (type=str)
Returns:
unified diff lines (maybe a generator)
           (type=iterable)

_tags(self, list1, list2)

Returns diff tags
Parameters:
list1 - The first sequence
           (type=list)
list2 - The second sequence
           (type=list)
Returns:
iterable of tags ((code, a1, a2, b1, b2), ...)
           (type=generator)

Generated by Epydoc 2.0 on Sun Sep 25 20:49:07 2005 http://epydoc.sf.net