Andrew Reedick wrote on Tue, Dec 03, 2013 at 15:04:13 -0500:
> 
> 
> > -----Original Message-----
> > From: Daniel Shahaf [mailto:d...@daniel.shahaf.name]
> > Sent: Tuesday, December 03, 2013 1:14 PM
> > To: Andrew Reedick
> > Cc: Alfred von Campe; users@subversion.apache.org
> > Subject: Re: Help with post-commit script
> > 
> > 
> > > svnlook changed ... > $CHANGED_LIST || exit 1 cat $CHANGED_LIST | sed
> > > 's/^....//g' | perl -ne 'print "$1$2\n" if
> > > /^(trunk)\/|^(branches\/[^\/]*)\//' | sort -u | xargs -n 1 -i svnlook
> > > propget $REPOS_PATH my:filelist_prop "{}" > $FILES_TO_REPORT_ON  ||
> > > exit 1
> > >
> > > cat $CHANGED_LIST | while read i
> > 
> > 'read' splits on whitespace, so filenames that contain spaces won't
> > DTRT.
> 
> Close.  Read will drop leading/trailing whitespace.  It does respect
> "internal" whitespace though. 
> 

Thanks for the correction.

> How does 'svnlook changed' output filenames with embedded newlines
> anyway?

It doesn't, but in FSFS repositories they can't be added in the first
place.

> The entries in the filelist svn property would need to be in a regex format.  
> So everything would be escaped already. 
> 

The pattern is $i, which comes from the dirs-changed output, not from
the property.  (I agree with the 'grep -qF' solution, though.)

> SVNLOOK_CMD=/path/to/svnlook

You still need to make sure grep, perl, etc are in the path (or use
abspaths to them).  perl won't be in the pth, for example.

Reply via email to