You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by sy...@grmtech.com on 2005/03/05 00:03:50 UTC

svn propget for 9000 revisions. there must be a more efficient way

I have a file called index.html in a subversion repository of many files.
The file:index.html has a single property called description. The
repository is at revision 9000.

svn propget description index.html
"This is the description of index.html"

I would like to know if file:index.html property:description
1. was it changed any time in the past
2. If it was at which revision number was it changed
3. what was the value before the change.

how can i go this in the most efficient way ?

Some ways to do it are:
1. for(i=0;i<9001;i++)
svn propget -r $i description index.html
This will tell me the value of the property:description for
file:index.html over the last 9000 iterations which i can then compare to
know when did it change and what was the value before the change.

2. we might divide the whole set of 9000 revisions into two, compare and
see if there is a difference, if there is a difference again divide into
two and compare and so on.

there must be some more efficient ways there ? any pointers ?


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

Re: svn propget for 9000 revisions. there must be a more efficient way

Posted by Chia-liang Kao <cl...@clkao.org>.
Ben Collins-Sussman <sussman <at> collab.net> writes:
> On Mar 4, 2005, at 6:03 PM, sysadmin <at> grmtech.com wrote:
> > there must be some more efficient ways there ? any pointers ?
>
> 'svn log -v index.html' will show every revision in which index.html 
> changed.  That's pretty much the point of 'svn log'.
> 
> It won't tell you if it was a textual change or a property change, or 
> both.  But 'svn diff -r X-1:X index.html' will show you the specifics.

If you have svk, it can be a bit easier.  the log from svk is like:

r595 (orig r685):  autrijus | 2004-10-18 18:11:54 +0800
Changed paths:
   M /svk/trunk
   M /svk/trunk/lib/SVK/Command/Admin.pm
  A  /svk/trunk/lib/SVK/Help/zh_cn/Index.pod
  MM /svk/trunk/lib/SVK/Help/zh_tw/Index.pod

So you can tell property changes, but again, it does not tell you what property
changed, you need to do svk desc 595 in this case.  Probably only a bit better
than typing 594:595.

Cheers,
CLK



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

Re: svn propget for 9000 revisions. there must be a more efficient way

Posted by John Szakmeister <jo...@szakmeister.net>.
On Friday 04 March 2005 19:23, Ben Collins-Sussman wrote:
> On Mar 4, 2005, at 6:03 PM, sysadmin@grmtech.com wrote:
> > there must be some more efficient ways there ? any pointers ?
>
> 'svn log -v index.html' will show every revision in which index.html
> changed.  That's pretty much the point of 'svn log'.

I've run into this situation in the past, so I changed the way we make our 
log messages.  We use the format:
 * path/to/file [XY]

where X and Y are the first to columns of 'svn st' for that file or 
directory.

However, I wonder if we could do the same for 'svn log -v'?  It would at 
least limit the number of 'svn diff' commands you needed to issue.

> It won't tell you if it was a textual change or a property change, or
> both.  But 'svn diff -r X-1:X index.html' will show you the specifics.

-John

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

Re: svn propget for 9000 revisions. there must be a more efficient way

Posted by Ben Collins-Sussman <su...@collab.net>.
On Mar 4, 2005, at 7:21 PM, sysadmin@grmtech.com wrote:

> cool, so i need to use two commands on the file svn log and then a svn
> diff. One more related question, svn log -vq <filename> gives me a 
> output
> which is rather big, do i need to parse it to get the revision numbers
> where the file changed (either the content or the property) or do we 
> have
> a simpler way to directly get the revisions when the file changed which
> can then be fed to svn diff.
>

You have two more options --

1. 'svn log -vq --xml' might be easier to parse,

2.  if you direct access to the repository (no network), you can run 
'svnlook history'.  For example:

$ svnlook history /usr/local/svn/testrepos svn_xml.h

REVISION   PATH
--------   ----
       20   /svn_xml.h
       19   /svn_xml.h
       18   /svn_xml.h
       17   /svn_xml.h
       16   /svn_xml.h
        1   /svn_xml.h


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

Re: svn propget for 9000 revisions. there must be a more efficient way

Posted by sy...@grmtech.com.
cool, so i need to use two commands on the file svn log and then a svn
diff. One more related question, svn log -vq <filename> gives me a output
which is rather big, do i need to parse it to get the revision numbers
where the file changed (either the content or the property) or do we have
a simpler way to directly get the revisions when the file changed which
can then be fed to svn diff.

svn log -vq index.html
------------------------------------------------------------------------
r16 | root | 2005-03-04 04:34:09 -0800 (Fri, 04 Mar 2005)
Changed paths:
   M /trunk/www/articles/index.html
------------------------------------------------------------------------
r15 | root | 2005-03-04 04:33:11 -0800 (Fri, 04 Mar 2005)
Changed paths:
   M /trunk/www/articles/index.html
------------------------------------------------------------------------


regards,

vikas
>
> On Mar 4, 2005, at 6:03 PM, sysadmin@grmtech.com wrote:
>>
>> there must be some more efficient ways there ? any pointers ?
>>
>>
>
> 'svn log -v index.html' will show every revision in which index.html
> changed.  That's pretty much the point of 'svn log'.
>
> It won't tell you if it was a textual change or a property change, or
> both.  But 'svn diff -r X-1:X index.html' will show you the specifics.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>



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

Re: svn propget for 9000 revisions. there must be a more efficient way

Posted by Ben Collins-Sussman <su...@collab.net>.
On Mar 4, 2005, at 6:03 PM, sysadmin@grmtech.com wrote:
>
> there must be some more efficient ways there ? any pointers ?
>
>

'svn log -v index.html' will show every revision in which index.html 
changed.  That's pretty much the point of 'svn log'.

It won't tell you if it was a textual change or a property change, or 
both.  But 'svn diff -r X-1:X index.html' will show you the specifics.


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