You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Anthony Ettinger <an...@chovy.com> on 2008/04/23 18:43:27 UTC

svn history | log for a given user?

I want to see my history in svn, is there a way to limit the results
to only my changesets?



-- 
Anthony Ettinger
408-656-2473
http://anthony.ettinger.name

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: RE: svn history | log for a given user?

Posted by "Reedick, Andrew" <jr...@ATT.COM>.
> -----Original Message-----
> From: Reedick, Andrew
> Sent: Wednesday, April 23, 2008 4:25 PM
> To: Anthony Ettinger; users@subversion.tigris.org
> Subject: RE: svn history | log for a given user?
> 
> > -----Original Message-----
> > From: ettinger@gmail.com [mailto:ettinger@gmail.com] On Behalf Of
> > Anthony Ettinger
> > Sent: Wednesday, April 23, 2008 2:43 PM
> > To: users@subversion.tigris.org
> > Subject: svn history | log for a given user?
> >
> > I want to see my history in svn, is there a way to limit the results
> > to only my changesets?
> >
> 
> 
> I'm not an xslt guru, but after 10 minutes at
> http://www.w3schools.com/xsl/default.asp
> 
> 

Here's a more complete xslt.  It lists the revision and filenames.
You will also need to run:  'svn log --xml -v svn://some/url > foo.xml'


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<body>
	<h2>Header</h2>
	<table border="1">
		<xsl:for-each select="log/logentry">
			<xsl:if test="author='YOUR_NAME_HERE'">
				<tr>
					<td><xsl:value-of
select="@revision"/></td>
					<td><xsl:value-of
select="author"/></td>
					<td><xsl:value-of
select="date"/></td>
					<td><xsl:value-of
select="msg"/></td>
				</tr>
				<xsl:for-each select="paths/path">
					<tr>
						<td></td>
						<td><xsl:value-of
select="@action"/></td>
						<td><xsl:value-of
select="."/></td>
					</tr>
				</xsl:for-each>
			</xsl:if>
		</xsl:for-each>
	</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>





*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


RE: svn history | log for a given user?

Posted by "Reedick, Andrew" <jr...@ATT.COM>.
> -----Original Message-----
> From: ettinger@gmail.com [mailto:ettinger@gmail.com] On Behalf Of
> Anthony Ettinger
> Sent: Wednesday, April 23, 2008 2:43 PM
> To: users@subversion.tigris.org
> Subject: svn history | log for a given user?
> 
> I want to see my history in svn, is there a way to limit the results
> to only my changesets?
> 
 

I'm not an xslt guru, but after 10 minutes at
http://www.w3schools.com/xsl/default.asp


1.  Create this file with your name:  foo.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
<body>
	<h2>Header</h2>
	<table border="1">
		<xsl:for-each select="log/logentry">
		<xsl:if test="author='YOUR_NAME_HERE'">
		<tr>
			<td><xsl:value-of select="author"/></td>
			<td><xsl:value-of select="msg"/></td>
		</tr>
		</xsl:if>
		</xsl:for-each>
	</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>


2.  Run:  svn log --xml svn://some/where > foo.xml

3.  Edit foo.xml and add this line after the first line:
<?xml-stylesheet type="text/xsl" href="foo.xsl"?>

4.  Open the xml in your favorite browser.  Firefox url:
file:///C:/some/dir/on/my/drive/foo.xml

5.  ??

6.  Profit!



I'm not a big fan of step 3, where you insert a reference to the xslt in
to the xml data.  Does anyone know a way around it?




*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: svn history | log for a given user?

Posted by Andy Levy <an...@gmail.com>.
On Wed, Apr 23, 2008 at 2:43 PM, Anthony Ettinger <an...@chovy.com> wrote:
> I want to see my history in svn, is there a way to limit the results
>  to only my changesets?

Just good, old fashioned log parsing.

Actually, if you use --xml, you can write an XSLT to only pull out the
nodes which have your name connected with them. It's the <author>
node, child of <logentry>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: svn history | log for a given user?

Posted by Hari Kodungallur <hk...@gmail.com>.
On Wed, Apr 23, 2008 at 11:43 AM, Anthony Ettinger <an...@chovy.com>
wrote:

> I want to see my history in svn, is there a way to limit the results
> to only my changesets?
>
>
No way to do it directly. You could parse the output (bash, or use xml
output and parse it).
Another option, not foolproof but works most of the time, is to use the
contrib/client-side/search-svnlog.pl script from the source distribution.
This script should be run from a working copy. Or if you don't have a
working copy, get the log output redirected to a file and pass it to the
script.  From the working copy running the following command should give you
the desired result:

$ search-svnlog.pl <your-user-name>

Or if you have a the logs redirected to a file:

$ search-svnlog.pl -f <logfile> <your-user-name>

This is not foolproof because it searches for the regex (in this case
your-user-name) in the entire log message. So for example if someone else
mentions your user name in his check-in comment, that will show up in the
result as well!


Regards,
-Hari