| 128 | } |
| 129 | |
| 130 | bool BazaarPlugin::isVersionControlled(const QUrl& localLocation) |
| 131 | { |
| 132 | QDir workCopy = BazaarUtils::workingCopy(localLocation); |
| 133 | auto* job = new DVcsJob(workCopy, this, OutputJob::Silent); |
| 134 | job->setType(VcsJob::Unknown); |
| 135 | job->setIgnoreError(true); |
| 136 | *job << "bzr" << "ls" << "--from-root" << "-R" << "-V"; |
| 137 | job->exec(); |
| 138 | if (job->status() == VcsJob::JobSucceeded) { |
| 139 | QList<QFileInfo> filesAndDirectoriesList; |
| 140 | const auto output = job->output().split(QLatin1Char('\n')); |
| 141 | filesAndDirectoriesList.reserve(output.size()); |
| 142 | const QChar dirSeparator = QDir::separator(); |
| 143 | for (const auto& fod : output) { |
| 144 | filesAndDirectoriesList.append(QFileInfo(workCopy.absolutePath() + dirSeparator + fod)); |
| 145 | } |
| 146 | QFileInfo fi(localLocation.toLocalFile()); |
| 147 | if (fi.isDir() || fi.isFile()) { |
| 148 | QFileInfo file(localLocation.toLocalFile()); |
| 149 | return filesAndDirectoriesList.contains(file); |
| 150 | } |
| 151 | } |
| 152 | return false; |
| 153 | } |
| 154 | |
| 155 | VcsJob* BazaarPlugin::log(const QUrl& localLocation, const VcsRevision& rev, long unsigned int limit) |
| 156 | { |
nothing calls this directly
no test coverage detected