Am 09.03.2012 um 20:18 schrieb Richard Heck: > On 03/09/2012 11:06 AM, Stephan Witt wrote: >> >> Ok, here comes the patch. If anybody can give it a try - especially on >> Windows - I'm interested in the result. Otherwise I'll commit it on Sunday >> or so... I've introduced the FileName::parentPath() method to avoid the >> infinite loop when FileName::onlyPath() reaches the root of the file system. >> I don't want to compare strings here. >> > The way this works now, we have to: (i) traverse up, looking for .svn, and > then (ii) call "svn info file" to figure out if the file is under vc. How > about: > > FileName const SVN::findFile(FileName const& file) > { > string const fname = onlyFileName(file.absFileName()); > bool const found = 9doVCCommandCall("svn info " + quoteName(fname)) == > 0); > return found ? file : FileName(); > } > > > I'm guessing that svn basically does the traversal for us then. Is it that > much more expensive to do the external call rather than to try traversing the > filesystem ourselves? Maybe this was already discussed....
Yes, this was already discussed... You're repeating my arguments :) On my system 1000 calls of "svn info filex.lyx" took 38 seconds (making 38 msecs per file to open). The traversal for .svn directory takes 0.4 .. 1 msecs per file to open. Pavel, can you check please, what the numbers are on your system? Stephan