This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients BreamoreBoy, stefanv, swixel, techtonik, terry.reedy, twhitema
Date 2010-09-20.20:57:58
SpamBayes Score 2.3126707e-07
Marked as misclassified No
Message-id <1285016281.01.0.155492319441.issue2057@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-09-20 20:58:01terry.reedysetrecipients: + terry.reedy, techtonik, twhitema, stefanv, swixel, BreamoreBoy
2010-09-20 20:58:01terry.reedysetmessageid: <1285016281.01.0.155492319441.issue2057@psf.upfronthosting.co.za>
2010-09-20 20:57:59terry.reedylinkissue2057 messages
2010-09-20 20:57:58terry.reedycreate