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
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|