Re: Half solution: How to get the list of files I modified in the last 3 weeks?
Walter Nicholls <[email protected]> Wed, 27 Jul 2005 23:41:06 +1200
| Newsgroups | gmane.comp.version-control.subversion.devel,gmane.mail.eyebrowse.user |
|---|---|
| Message-ID | <42E772D2.3060901__4154.17728149823$1122464676$gmane$org@cornerstone.co.nz> |
Tardif, Sebastien wrote:
> svn log -qvr {2005-07-01}:HEAD . | grep /trunk |sort|uniq -s 4
> (tested with cygwin on windows)
>
> Will do most of the job except filtering out the other user than me.
> Doing that seems the most complicate. So come the request to a new
> feature:
>
> Can we add to [svn log] command a parameter specifying which user or
> set of user we want information about?
>
> The most powerful mechanism would be to enable regular expression on
> user name.
>
With Subversion 1.2 client, yes, get the log output in XML and feed it
through an XSLT processor
something like this...
svn log --xml -vr {2005-07-01}:HEAD | xml tr c:\temp\filterlog.xsl |
sort | uniq
Get xml.exe from http://xmlstar.sourceforge.net/ but any XSLT processor
would do. Regular expressions no problem with XSLT, right?
filterlog.xsl I threw together - very quickly
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="/log/logentry[author='Walter']/paths/path">
<xsl:value-of select="."/>
<xsl:value-of select="' '"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
I'm sure with a bit more work this could be parameterised so the
username could be given on the command line, and the XSLT processor
could probably de-dupe it too.
- Walter