Re: [viewvc-dev] Re: Using rcsparse for filtering *,v files?
"C. Michael Pilato" <[email protected]> Mon, 04 May 2009 11:43:46 -0400
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.devel |
|---|---|
| Organization | CollabNet, Inc. |
| Message-ID | <49FF0D32.3010509__6527.92549594796$1241451856$gmane$org@collab.net> |
Michael Haggerty wrote: > Michael Haggerty wrote: >> As some of you certainly know, we use rcsparse in the cvs2svn project >> (http://cvs2svn.tigris.org). I have a question about another idea that >> I have for using rcsparse in that project. >> >> I'm currently working on scripts that allow users to expurgate sensitive >> information from their CVS repositories so that they can easily create >> test cases for cvs2svn bugs even if the original repository contained >> proprietary information. Some things are easy to strip out, but to >> eliminate (for example) author names, a more sophisticated technique is >> required. >> >> So I was thinking of using rcsparse to read the RCS file, munging it on >> the way through, then outputting a new RCS file to disk. >> >> Does anybody know how difficult this would be to do? Is enough >> information available from the rcsparse Sink interface to recreate a >> file 1:1 (or nearly 1:1)? Is there an example Sink that simply >> regenerates the contents of the original *,v file? >> >> If such a 1:1 Sink were available, it would be easy to use it as a >> starting point to build a filter that makes arbitrary modifications. >> >> Any comments or pointers? > > It turns out that this wasn't so hard, so I did it myself. The result > is the class WriteRCSFileSink, which can be seen at > > http://cvs2svn.tigris.org/svn/cvs2svn/trunk/contrib/rcs_file_filter.py > > (This version uses cvs2svn's copy of rcsparse. If you want to try it > out in place, then check out > > http://cvs2svn.tigris.org/svn/cvs2svn/trunk > > .) > > It might make sense to including a file like this in your project rather > than in cvs2svn (as a demonstration of working with rcsparse). If you > would be interested, please let me know. > > Michael [I can't recall if I ever replied to this, so...] I agree that it makes sense to put this into our rcsparse module. If you find time to do so, +1. -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=2057587 To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkn/DTIACgkQokEGqRcG/W5JAQCfbpUC+OYFBP7VsqNh7FcTw8NW Cs4AoLDPnvKLTUdPS474XR9AFwDitU/t =cRrg -----END PGP SIGNATURE-----