[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing author names in RCS files

From: Sylvain Beucler
Subject: Re: Editing author names in RCS files
Date: Tue, 7 Dec 2004 07:25:36 +0100
User-agent: Mutt/

On Mon, Dec 06, 2004 at 04:47:56PM -0800, Mark D. Baushke wrote:
> Sylvain Beucler <address@hidden> writes:
> > Hello,
> > 
> > I would like to fix a problem that occured at Savannah. The issue is
> > pretty much described here:
> >
> > 
> > and to sum up, the logged username became uid##### instead of the
> > actual username, for a few days about a year ago. For example, user
> > "miles" became "uid65618":
> >
> > 
> > The mapping uid<->user can be found using /etc/passwd.
> > 
> > 
> > We would like to write a script to fix these usernames. However,
> > rcs(1) is not meant to do it; moreover, the various RCS parser I had a
> > look at are more concerned about extracting revisions than making
> > changes to the actual RCS file, when they are not beta versions.
> > 
> > Various web and mailing list archive searches didn't help.
> > 
> > What do you think is the best way to fix the RCS files? Of course,
> > "manual editing" is valid, but I have the failing to expect a quicker
> > way :)
> Quicker? Hmmm...
>    find . -name \*,v -print0 \|
>    xargs -0 perl -i.bak -pane \
>   's,^(date\s+[0-9.]+;\s+author\s+)uid65618;(\s+state\s\S;$),$1miles;$2,g;'
> Of course, I urge you to ensure that the repository is locked or
> otherwise not actively being modified when you run the script.
> I would suggest performing the initial runs of the script on a snapshot
> of the repository and then doing a comparison of the .bak files with
> the original versions to ensure everything looks correct.

Thanks. However, I was looking for a more "secure" way to do the
job. In the best case, I would like to apply the script to fix ~2000

The script you suggest could match a line in the deltas (for example,
in a file discussing the RCS format) instead of in the administrative
part. I could stop the substitution when I meet "desc(\s|\n)@", but I
am afraid of missing that "separator" when parsing a RCS file
generated by an older version of CVS - hence why I looked for a RCS

Moreover, it is difficult to test whether the substitution occured

Any idea?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]