You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Woodworth, James" <JW...@flr.follett.com> on 2011/01/21 17:18:15 UTC

examining repository for files that only I have changed

Hello,

 

Over the past three weeks I have changed and committed some files.  I
need to somehow recurse through the directories and show me only the
files I have changed.  How do I do this?

 

I suppose I could write a script to do this, but I suspect Subversion is
sophisticated enough, and I am just missing something.

 

Thank you,

Jim


Re: examining repository for files that only I have changed

Posted by OBones <ob...@free.fr>.
Woodworth, James wrote:
>
> Hello,
>
> Over the past three weeks I have changed and committed some files.  I 
> need to somehow recurse through the directories and show me only the 
> files I have changed.  How do I do this?
>
> I suppose I could write a script to do this, but I suspect Subversion 
> is sophisticated enough, and I am just missing something.
>
> Thank you,
>
> Jim
>
Shouldn't this be enough?

svn log http://repos | grep username

Re: examining repository for files that only I have changed

Posted by JamieEchlin <ja...@credit-suisse.com>.


Woodworth, James wrote:
> 
> Over the past three weeks I have changed and committed some files.  I
> need to somehow recurse through the directories and show me only the
> files I have changed.  How do I do this?
> 

Install TortoiseSvn. Fire up the log for the repo. Pull down the magnifying
glass in the search window and select author, enter your user ID.

For each changelist you can diff with previous.

Not sure if it's possible to get a consolidated diff of just your changes...
might be possible with diff and patch.
-- 
View this message in context: http://old.nabble.com/examining-repository-for-files-that-only-I-have-changed-tp30730183p30730415.html
Sent from the Subversion Users mailing list archive at Nabble.com.


Re: examining repository for files that only I have changed

Posted by B Smith-Mannschott <bs...@gmail.com>.
On Fri, Jan 21, 2011 at 17:18, Woodworth, James
<JW...@flr.follett.com> wrote:
> Hello,
>
> Over the past three weeks I have changed and committed some files.  I need
> to somehow recurse through the directories and show me only the files I have
> changed.  How do I do this?
>
> I suppose I could write a script to do this, but I suspect Subversion is
> sophisticated enough, and I am just missing something.

Subversion will give you the log as XML, if you ask for it:

    svn log --verbose --xml svn://server/repository

Here's an XSLT that will extract the names of *files* added, deleted
or modified by a given *author*:

-- files-modified-by-author.xsl --
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="text"/>
  <xsl:param name="author">smithma</xsl:param>
  <xsl:template match="/log/logentry">
    <xsl:if test="author=$author">
      <xsl:apply-templates select="paths/path[@kind='file']"/>
    </xsl:if>
  </xsl:template>
  <xsl:template match="/log/logentry/paths/path">
    <xsl:value-of select="text()"/>
    <xsl:text>&#x000a;</xsl:text>
  </xsl:template>
  <xsl:template match="text()"/>
</xsl:stylesheet>
-- end file --

Here's a BASH script which will call svn for the log, pull out the
files using xsltproc and the above XSL transformation and then toss
out duplicates using sort:

-- files-modified-by-author.bash --
REPOSITORY=svn://server/repository
AUTHOR=username

function get_log () {
    svn log --xml --verbose $REPOSITORY
}

function select_files () {
    xsltproc --stringparam author $AUTHOR files-modified-by-author.xsl -
}

get_log | select_files | sort -u
-- end file --

Edit the values of REPOSITORY and AUTHOR as necessary for your
repository and user name.

Then, you can call the script as follows and record the resulting list
of file names in a file for perusal at your leisure:

    bash files-modified-by-author.bash > files-modified-by-author.txt

HTH

// Ben