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....

Richard

Reply via email to