CVS commit by tobgle: Implemented isValidDirectory() and made the SVN context menu working only, if there is really a svn repository in the project. M +11 -1 subversion_part.cpp 1.19 --- kdevelop/vcs/subversion/subversion_part.cpp #1.18:1.19 @@ -168,8 +168,18 @@ KDevVCSFileInfoProvider * subversionPart bool subversionPart::isValidDirectory( const QString& dirPath) { - return true; + QString svn = "/.svn/"; + QDir svndir( dirPath + svn ); + QString entriesFileName = dirPath + svn + "entries"; + + return svndir.exists() && + QFile::exists( entriesFileName ); } void subversionPart::contextMenu( QPopupMenu *popup, const Context *context ) { +// If the current project doesn't support SVN, we don't +// want to confuse the user with a SVN popup menu. +if(!isValidDirectory(project()->projectDirectory())) + return; + kdDebug() << "contextMenu()" << endl; if (context->hasType( Context::FileContext ) ||