[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Merge policies

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 02 May 2012 11:47:58 +0100

Johan Corveleyn <jcorvel_at_gmail.com> writes:

> On Fri, Apr 20, 2012 at 10:52 PM, Stefan Fuhrmann <eqfox_at_web.de> wrote:
>> Am 19.04.2012 14:03, schrieb Johan Corveleyn:
>>> - maybe propgetting through one of the bindings is much faster than
>>> through svnlook, and you intend for admins to set this up with some
>>> language bindings? In that case, keep in mind that bindings are not
>>> always installed. Svnlook usually is always there.
>>
>>
>> The problem is probably that svnlook is at a hefty
>> disadvantage over e.g. the server because it has
>> to open the FSFS repo anew for each access. Don't
>> know really what to do about that.
>
> So the only way to get the "relevant property changes" really fast
> with svnlook, would be with a command that gets everything with one
> invocation, I guess.
>
> Actually, there is probably a way to get all those propchanges
> quicker, by parsing the output of 'svnlook diff -t TXN'. But I've not
> done the effort to do that.

As suggested above, the bindings are fast:

$ svnadmin create repo
$ svn import -mm ../src file://`pwd`/repo/trunk # import Subversion trunk
$ svn co file://`pwd`/repo wc
$ svn ps -R svn:mime-type foo/bar wc
$ svn ci -mm wc
$ ./x.py repo 2 | wc
   2270 2270 141635

Getting the mime-type for 2270 files takes less than 1 second.

$ cat x.py
#!/usr/bin/python
import sys
from svn import repos, fs
r=repos.open(sys.argv[1])
f=repos.fs(r)
#t=fs.open_txn(f, sys.argv[2])
t=fs.revision_root(f, int(sys.argv[2]))
p=fs.paths_changed2(t)
for key, val in p.iteritems():
  print key + ":" + str(fs.node_prop(t, key, 'svn:mime-type'))

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-05-02 12:48:37 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.