forked from mhagger/cvs2svn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue mhagger#18: Use internal lines instead of plain text in checkou…
…t_db. As the return value of RCSStream.invert_diff() is not to be applied for flat text content but for internal logical lines in RCSStream, which may contain some unterminated logical lines at any position, so we should use the content of internal logical lines in RCSStream as base text which is used to get the content of the next newer revision. With this commit, it is implemented by splitting the checkout() method in TextRecord, checkout() method for external use for as in the past and checkout_as_lines() method for internal use. * cvs2svn_lib/checkout_internal.py (TextRecord.checout_as_lines): New method. Replacement of checkout() method but returns internal lines in RCSStream instead of a plain text. (TextRecord.checkout): Use checkout_as_lines() for default implementation. (FullTextRecord.checkout, DeltaTextRecord.checkout): Removed to use default implementation. (FullTextRecord.checkout_as_lines): New method. Just same logic as the past checkout() method. (DeltaTextRecord.checkout_as_lines): New method. Just same logic as the past checkout() method but uses internal lines in rcs_stream instead of its text. (_Sink.set_revision_info): Record the internal lines in rcs_stream instead of its text at revision 1.1. * cvs2svn_lib/rcs_stream.py (RCSStream.__init__): Allow to set lines directly in addition to a text. (RCSStream.get_lines): New method.
- Loading branch information
Showing
2 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters