Avoid unlink of an open file.
Works on Unix, not so great on Windows it turns out. Thanks to Jasin and Geoff for figuring this out in the end.
This commit is contained in:
@@ -136,7 +136,7 @@ void SVNDirectory::parseCache()
|
|||||||
_cachedRevision = versionName;
|
_cachedRevision = versionName;
|
||||||
doneSelf = true;
|
doneSelf = true;
|
||||||
} else {
|
} else {
|
||||||
DAVResource* child = addChildDirectory(hrefPtr)->collection();
|
DAVResource* child = parseChildDirectory(hrefPtr)->collection();
|
||||||
string s = strutils::strip(versionName);
|
string s = strutils::strip(versionName);
|
||||||
if (!s.empty()) {
|
if (!s.empty()) {
|
||||||
child->setVersionName(versionName);
|
child->setVersionName(versionName);
|
||||||
@@ -235,6 +235,17 @@ SVNDirectory::addChildDirectory(const std::string& dirName)
|
|||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SVNDirectory*
|
||||||
|
SVNDirectory::parseChildDirectory(const std::string& dirName)
|
||||||
|
{
|
||||||
|
assert(!dav->childWithName(dirName));
|
||||||
|
DAVCollection* childCol = dav->createChildCollection(dirName);
|
||||||
|
SVNDirectory* child = new SVNDirectory(this, childCol);
|
||||||
|
childCol->setVersionName(child->cachedRevision());
|
||||||
|
_children.push_back(child);
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
|
||||||
void SVNDirectory::deleteChildByName(const std::string& nm)
|
void SVNDirectory::deleteChildByName(const std::string& nm)
|
||||||
{
|
{
|
||||||
DAVResource* child = dav->childWithName(nm);
|
DAVResource* child = dav->childWithName(nm);
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ private:
|
|||||||
void writeCache();
|
void writeCache();
|
||||||
|
|
||||||
DirectoryList::iterator findChildDir(const std::string& dirName);
|
DirectoryList::iterator findChildDir(const std::string& dirName);
|
||||||
|
SVNDirectory* parseChildDirectory(const std::string& dirName);
|
||||||
|
|
||||||
SGPath localPath;
|
SGPath localPath;
|
||||||
DAVCollection* dav;
|
DAVCollection* dav;
|
||||||
|
|||||||
Reference in New Issue
Block a user