[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Searching Properties

From: Benjamin Pflugmann <benjamin-svn-dev_at_pflugmann.de>
Date: 2002-09-04 05:05:01 CEST

Hello.

Replying more to the original mail...

On Tue 2002-09-03 at 18:18:25 +0200, Alexis Huxley wrote:
> > svn pl -vR
> >
> > Of course the only problem now is that the verbose output of 'svn
> > proplist' isn't very friendly for piping through grep. If I were to
> > pipe through "grep 'color : green'", I'd see the matching lines, but
> > have no idea which items the matching properties were attached to.
> > That's because proplist outputs pairs of lines:
> >
> > Properties on 'INSTALL':
> > svn:keywords : LastChangedDate
> > Properties on 'gen-make.py':
> > svn:executable : on
> > Properties on 'packages/freebsd/subversion':
> > svn:ignore : work
> >
> > Hmmmmmmmmmm.
>
> If you like in a GNU universe, then pipe the result of
> the svn command through
>
> sed ':b;/:$/{;N;s/:\n[ ]*//;bb;}'

Always being confused by sed commands except "s///" (have to look this
up afterwards), I would have suggested (also expecting a GNU universe ;):

  svn pl -vR | grep '^Properties\|color : green' | grep -v -B1 '^Properties'

which would also handle multiple properties.

> Not sure if it'll choke on multiple properties, but
> the necessary adaption should be difficult.

HTH,

        Benjamin.

  • application/pgp-signature attachment: stored
Received on Wed Sep 4 05:05:36 2002

This is an archived mail posted to the Subversion Dev mailing list.