diff options
author | Orgad Shaneh <[email protected]> | 2012-09-02 11:26:26 +0300 |
---|---|---|
committer | Orgad Shaneh <[email protected]> | 2012-09-03 13:17:58 +0200 |
commit | 856b7f15aba496860ebd53c4c855d18a7bdf995f (patch) | |
tree | 6c55a51aafe702235e120f5e993237cd69d12698 /src/plugins/clearcase/clearcaseplugin.cpp | |
parent | b9c58161e41d245d0c6ffb657480c50859172e6d (diff) |
ClearCase: Support systems without external diff
CC's internal diff is worthless, just disable multiple files actions
Change-Id: Ia8541e6edc6582777fc141da849819a5a11543b6
Reviewed-by: Tobias Hunger <[email protected]>
Reviewed-by: Leena Miettinen <[email protected]>
Diffstat (limited to 'src/plugins/clearcase/clearcaseplugin.cpp')
-rw-r--r-- | src/plugins/clearcase/clearcaseplugin.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index b2ce7101699..007526027c0 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -706,8 +706,13 @@ void ClearCasePlugin::undoHijackCurrent() const QString fileName = state.relativeCurrentFile(); bool keep = false; - QString diffres = diffExternal(ccGetFileVersion(state.topLevel(), fileName), fileName); - if (diffres.at(0) != QLatin1Char('F')) { // Files are identical + bool askKeep = true; + if (m_settings.extDiffAvailable) { + QString diffres = diffExternal(ccGetFileVersion(state.topLevel(), fileName), fileName); + if (diffres.at(0) == QLatin1Char('F')) // Files are identical + askKeep = false; + } + if (askKeep) { Ui::UndoCheckOut unhijackUi; QDialog unhijackDlg; unhijackUi.setupUi(&unhijackDlg); @@ -749,6 +754,11 @@ void ClearCasePlugin::ccDiffWithPred(const QStringList &files) diffGraphical(file); return; // done here, diff is opened in a new window } + if (!m_settings.extDiffAvailable) { + VcsBase::VcsBaseOutputWindow::instance()->appendError( + tr("External diff is required to compare multiple files.")); + return; + } QString result; foreach (const QString &file, files) { if (m_statusMap->value(QDir::fromNativeSeparators(file)).status == FileStatus::Hijacked) @@ -814,6 +824,11 @@ void ClearCasePlugin::diffActivity() QTC_ASSERT(state.hasTopLevel(), return); if (ClearCase::Constants::debug) qDebug() << Q_FUNC_INFO; + if (!m_settings.extDiffAvailable) { + VcsBase::VcsBaseOutputWindow::instance()->appendError( + tr("External diff is required to compare multiple files.")); + return; + } QString topLevel = state.topLevel(); QString activity = QInputDialog::getText(0, tr("Enter Activity"), tr("Activity Name"), QLineEdit::Normal, m_activity); if (activity.isEmpty()) @@ -1148,7 +1163,8 @@ void ClearCasePlugin::describe(const QString &source, const QString &changeNr) const ClearCaseResponse response = runCleartool(topLevel, args, m_settings.timeOutMS(), 0, codec); description = response.stdOut; - description += diffExternal(id); + if (m_settings.extDiffAvailable) + description += diffExternal(id); // Re-use an existing view if possible to support // the common usage pattern of continuously changing and diffing a file |