forked from qt-creator/qt-creator
ClearCase: Support systems without external diff
CC's internal diff is worthless, just disable multiple files actions Change-Id: Ia8541e6edc6582777fc141da849819a5a11543b6 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
b9c58161e4
commit
856b7f15ab
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user