Re: One more little bug with "file X was added on branch Y" revisions
Greg Ward <[email protected]> Tue, 15 Sep 2009 17:18:57 -0400
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Sep 15, 2009 at 2:51 PM, Greg Ward <[email protected]> wrote: >> If not, I'd rather leave things the way that they are. (I want to be >> very conservative about discarding revisions.) In this case, I suggest >> that you hand-edit the three log messages to match the expected pattern; >> then they will be omitted by cvs2svn. > > ...or patch the regex in cvs2svn to conform to my version of reality. > ;-) I'll do that and let you know how it works. OK, here's my patch: """ # HG changeset patch # User Greg Ward <[email protected]> # Date 1253049414 14400 # Node ID fa97f799434c20bef70ce02aa28f1ba6dce7db2f # Parent e78b916867859f86c1ea2b16b21cb5e1767609ce Loosen the regex for unneeded initial trunk deletes a bit. Specifically, certain (unknown) versions of CVS have in the past created unnecessary revisions with log messages like file file1 was added on branch BRANCH1 where we previously only expected file file1 was initially added on branch BRANCH1. * cvs2svn_lib/cvs_file_items.py: loosen regex diff --git a/cvs2svn_lib/cvs_file_items.py b/cvs2svn_lib/cvs_file_items.py --- a/cvs2svn_lib/cvs_file_items.py +++ b/cvs2svn_lib/cvs_file_items.py @@ -600,7 +600,7 @@ log_msg = metadata_db[cvs_item.metadata_id].log_msg return bool(re.match( - r'file .* was initially added on branch .*\.\n$', + r'file .* was (initially )?added on branch .*', log_msg, )) """ Works for me with the tiny test repo I emailed last week. Will be trying it out in a production conversion some time soon. Greg ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2395253 To unsubscribe from this discussion, e-mail: [[email protected]].