Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2001 15:43:11 +0200
From:      Gerhard Sittig <Gerhard.Sittig@gmx.net>
To:        stable@freebsd.org
Subject:   Re: Administrative tag a possibility?
Message-ID:  <20010519154311.D253@speedy.gsinet>
In-Reply-To: <3B04907A.5986E12D@nisser.com>; from roelof@nisser.com on Fri, May 18, 2001 at 05:01:14AM %2B0200
References:  <200105170543.f4H5hvZ01232@mass.dis.org> <3B04907A.5986E12D@nisser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 18, 2001 at 05:01 +0200, Roelof Osinga wrote:
> 
> But alas, it isn't. So if the quick and dirty solution is
> unacceptable than how about increasing its smarts? Going by the
> example given
> 
>  -#      $Id: gettytab,v 1.16 1998/09/02 01:34:55 brian Exp $
>  +# $FreeBSD: src/etc/gettytab,v 1.16.2.1 1999/08/29 14:18:43 peter Exp $
> 
> This suggest that a convention is already in place. Like -
> hubba, hubba; it's been a long time since I've last done
> interesting regexps - 
> 
> "$[A-Z][:alpha:]+: .*, v [0-9]+.[0-9][0-9].*[0-9]@4/[0-9]@2/[0-9]@2 \
> [:HhMmSs:] .* $"

This way you would match on _any_ pattern looking like a RCS tag.
But I'd rather enumerate the ones explicitely (we noticed "Id"
and "FreeBSD").  I don't actually know that there are some tags
of special interest or even dangerous to ignore, but I would play
it safe.

If you want to cut corners and match with a "bigger" or more
general pattern, you could as well 'ident $FILE > $PATTERNS' and
have them collapse like this (it's a sketch, not real code)

  cp $FILE $TEMP
  while read P; do
    P=`echo "$P" | sed 's/^ *//; s/ *$//'`  # needed?
    cat $FILE | sed 's/\('"$P"'\)/$TAG$/' > $TEMP.1
    mv $TEMP.1 $TEMP
  done < $PATTERNS

Plus for the other file and the comparison of the two temporary
results.

> Don't know if it makes sense since I've invented some
> conventions. Like using the @ to denote it's followed by a
> number indicating the numer of occurrences of the previous
> pattern.

Look at "man 7 re_format" :)  There's some [0-9]{4} notion.  The
thing is referred to as a "bound".


virtually yours   82D1 9B9C 01DC 4FB4 D7B4  61BE 3F49 4F77 72DE DA76
Gerhard Sittig   true | mail -s "get gpg key" Gerhard.Sittig@gmx.net
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010519154311.D253>