b.patches : module documentation

Part of bzrlib

No module docstring
Class BinaryFiles Undocumented
Class PatchSyntax Undocumented
Class MalformedPatchHeader Undocumented
Class MalformedHunkHeader Undocumented
Class MalformedLine Undocumented
Class PatchConflict Undocumented
Function get_patch_names Undocumented
Function parse_range Parse a patch range, handling the "1" special-case
Function hunk_from_header Undocumented
Class HunkLine Undocumented
Class ContextLine Undocumented
Class InsertLine Undocumented
Class RemoveLine Undocumented
Function parse_line Undocumented
Class Hunk No class docstring; 1/6 methods documented
Function iter_hunks
Class BinaryPatch Undocumented
Class Patch No class docstring; 3/7 methods documented
Function parse_patch
Function iter_file_patch
Function iter_lines_handle_nl Iterates through lines, ensuring that lines that originally had no
Function parse_patches
Function difference_index Find the indext of the first character that differs between two texts
Function iter_patched Iterate through a series of lines with a patch applied.
Function iter_patched_from_hunks Iterate through a series of lines with a patch applied.
def get_patch_names(iter_lines):
Undocumented
def parse_range(textrange):
Parse a patch range, handling the "1" special-case
ParameterstextrangeThe text to parse (type: str)
Returnsthe position and range, as a tuple (type: (int, int))
def hunk_from_header(line):
Undocumented
def parse_line(line):
Undocumented
def iter_hunks(iter_lines, allow_dirty=False):
Parametersiter_linesiterable of lines to parse for hunks
Unknown Field: kwargallow_dirtyIf True, when we encounter something that is not a hunk header when we're looking for one, assume the rest of the lines are not part of the patch (comments or other junk). Default False
def parse_patch(iter_lines, allow_dirty=False):
Parametersiter_linesiterable of lines to parse
Unknown Field: kwargallow_dirtyIf True, allow the patch to have trailing junk. Default False
def iter_file_patch(iter_lines, allow_dirty=False):
Parametersiter_linesiterable of lines to parse for patches
Unknown Field: kwargallow_dirtyIf True, allow comments and other non-patch text before the first patch. Note that the algorithm here can only find such text before any patches have been found. Comments after the first patch are stripped away in iter_hunks() if it is also passed allow_dirty=True. Default False.
def iter_lines_handle_nl(iter_lines):
Iterates through lines, ensuring that lines that originally had no
   terminating 
are produced without one.  This transformation may be
   applied at any point up until hunk line parsing, and is safe to apply
   repeatedly.
   
def parse_patches(iter_lines, allow_dirty=False):
Parametersiter_linesiterable of lines to parse for patches
Unknown Field: kwargallow_dirtyIf True, allow text that's not part of the patch at selected places. This includes comments before and after a patch for instance. Default False.
def difference_index(atext, btext):
Find the indext of the first character that differs between two texts
ParametersatextThe first text (type: str)
btextThe second text
str (type: str)
ReturnsThe index, or None if there are no differences within the range (type: int or NoneType)
def iter_patched(orig_lines, patch_lines):
Iterate through a series of lines with a patch applied. This handles a single file, and does exact, not fuzzy patching.
def iter_patched_from_hunks(orig_lines, hunks):
Iterate through a series of lines with a patch applied. This handles a single file, and does exact, not fuzzy patching.
Parametersorig_linesThe unpatched lines.
hunksAn iterable of Hunk instances.
API Documentation for Bazaar, generated by pydoctor at 2014-11-21 00:01:35.