diff options
Diffstat (limited to 'src/plugins/cvs/cvsplugin.cpp')
-rw-r--r-- | src/plugins/cvs/cvsplugin.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index adbde2d7df..9d4a8055f7 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -1226,7 +1226,7 @@ CvsResponse CvsPlugin::runCvs(const QString &workingDirectory, const QStringList &arguments, int timeOut, unsigned flags, - QTextCodec *outputCodec) + QTextCodec *outputCodec) const { const QString executable = m_settings.cvsBinaryPath; CvsResponse response; @@ -1365,6 +1365,17 @@ bool CvsPlugin::managesDirectory(const QString &directory, QString *topLevel /* return manages; } +bool CvsPlugin::managesFile(const QString &workingDirectory, const QString &fileName) const +{ + QStringList args; + args << QLatin1String("status") << fileName; + const CvsResponse response = + runCvs(workingDirectory, args, m_settings.timeOutMS(), SshPasswordPrompt); + if (response.result != CvsResponse::Ok) + return false; + return !response.stdOut.contains(QLatin1String("Status: Unknown")); +} + bool CvsPlugin::checkCVSDirectory(const QDir &directory) const { const QString cvsDir = directory.absoluteFilePath(QLatin1String("CVS")); |