This repository was archived by the owner on Aug 24, 2024. It is now read-only.
Improve CVS Log Message Parsing + Move appending to logbuff into own function#4
Open
pkeshish wants to merge 3 commits intoandreyvit:masterfrom
Open
Improve CVS Log Message Parsing + Move appending to logbuff into own function#4pkeshish wants to merge 3 commits intoandreyvit:masterfrom
pkeshish wants to merge 3 commits intoandreyvit:masterfrom
Conversation
Move the "hairy" size handling of logbuff extension to append_logbuff(). Ensure logbufflen doesn't overflow SIZE_MAX (however unlikely). Next commit will call append_logbuff() from a second area of the code. Initializing buffers is a good thing. Especially buff, since it will contain "stale" data (or "garbage") when cvs_rlog_fgets() only touches it if the read message is "M " (and not during "E " or "ok" or ...). This protects the debug() statement which follows.
Add LOGM in Valid-responses to cvs_direct. If the CVS server supports the feature, process LOGM responses, which eliminate all guess-work of parsing log/commit messages, which may contain file/revision boundaries. NOTE: LOGM patch has been proposed to CVS upstream and Thorsten Glaser has conveyed a favorable initial response. Second change is to add line count to "Log:" tag in PatchSets, this will in turn help Git-cvsimport (proposed patch) to known number of log/commit message lines to extract following the "Log:" tag. This will prevent Git-cvsimport from getting confused if the log/commit message contains lines starting with "Members:", for example. Abstracting away the open/close/fgets from cvs_direct or file/pipe is just a bonus.
Author
|
Just for reference, my proposal to CVS to include MLOG response can be found here: A link to what/why took me down this path: http://sidster.com/code/cvs2git/ |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I have a change for CVSps to help it digest CVS log/commit messages.
I am breaking it in two different commits for better/easier review.
I am unsure if this is the de facto "upstream" CVSps repository or not. The one I initially started my work on was from OpenBSD's ports tree, which is missing some of the new changes in this repo. I'm adapting my changes to this repo, hopefully not introducing any horrible bugs.
My next commit will also updates/appends to logbuff, which is the rational for moving that bit of code into its own function made sense, instead of duplication.
--patrick