Message116970
Given that difflib produces unified diffs (among 3 others) and that diff.py is a thin command-line wrapper that provides access to all 4 formats (with no default), I consider those two files 'ready'. So I presume you are referring to your patch.py, which is still labelled experimental.
Difflib works by analyzing sequences a and b with SequenceMatcher to produce a sequence of edits that would produce b from a. It then formats the edits into 1 of 4 formats.
Ideally, a patchlib would have a core SequenceEditor that would apply a sequence of edits (in the same format as SequenceMatcher's outputs) to sequence a to output sequence b. That much seems relatively easy. To be complete, it should also have at least 3 if not 4 parse functions that would produce edit sequences. A corresponding patch.py would then be a thin command-line wrapper over patchlib.
Your comments and a perusal of your code indicates that it has a unified diff parser, a sequence matcher, and command-line wrapper. I guess the immediate question is whether this would be enough for a start. |
|
Date |
User |
Action |
Args |
2010-09-20 20:58:01 | terry.reedy | set | recipients:
+ terry.reedy, techtonik, twhitema, stefanv, swixel, BreamoreBoy |
2010-09-20 20:58:01 | terry.reedy | set | messageid: <1285016281.01.0.155492319441.issue2057@psf.upfronthosting.co.za> |
2010-09-20 20:57:59 | terry.reedy | link | issue2057 messages |
2010-09-20 20:57:58 | terry.reedy | create | |
|