Skip to content
Snippets Groups Projects
Commit 509ac801 authored by Stefan Sperling's avatar Stefan Sperling
Browse files

rlog: fix loading of CVS commits which have a commit ID

The CVS commit ID is an optional attribute which is only generated
by relatively recent releases of CVS clients. Our rlog parser was
skipping such commits because it failed to match on them due to an
error in a regular expression.
This resulted in an incomplete import of CVS revision history.

Here is a sample line from cvs rlog output which carries a
commit ID and was not matched because the regex lacked the
trailing semicolon:
date: 2007-07-17 15:02:50 +0200;  author: larsl;  state: Exp;  lines: +619 -285;  commitid: oju0x8tTc9aUB7qs;

Found while testing ingestion of the GNU dino repository from
cvs.sannah.gnu.org/sources/dino
parent 0829dc33
No related branches found
No related tags found
1 merge request!17rlog: fix loading of CVS commits which have a commit ID
......@@ -370,7 +370,7 @@ _re_log_info = re.compile(
b"\s+author:\s+([^;]+);" # noqa: W605
b"\s+state:\s+([^;]+);" # noqa: W605
b"(\s+lines:\s+([0-9\s+-]+);?)?" # noqa: W605
b"(\s+commitid:\s+([a-zA-Z0-9]+))?\n$" # noqa: W605
b"(\s+commitid:\s+([a-zA-Z0-9]+);)?\n$" # noqa: W605
)
# TODO: _re_rev should be updated to extract the "locked" flag
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment