ClearCase: Persist save keep file on undo checkout

When undoing checkout on a modified file the user is prompted to
preserve the contents of the checked-out version under a file-name
of the form element-name.keep. Save the user's choice and use it
on subsequent undo checkout actions.

Change-Id: I26a73c7f1f456ae0cf1cad6741d30ff2aab4bf3f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Knut Petter Svendsen
2015-01-02 16:15:20 +01:00
committed by Orgad Shaneh
parent a49134c47a
commit db7fbc687a
3 changed files with 22 additions and 11 deletions

View File

@@ -920,9 +920,14 @@ void ClearCasePlugin::undoCheckOutCurrent()
QDialog uncoDlg;
uncoUi.setupUi(&uncoDlg);
uncoUi.lblMessage->setText(tr("Do you want to undo the check out of \"%1\"?").arg(fileName));
uncoUi.chkKeep->setChecked(m_settings.keepFileUndoCheckout);
if (uncoDlg.exec() != QDialog::Accepted)
return;
keep = uncoUi.chkKeep->isChecked();
if (keep != m_settings.keepFileUndoCheckout) {
m_settings.keepFileUndoCheckout = keep;
m_settings.toSettings(ICore::settings());
}
}
vcsUndoCheckOut(state.topLevel(), file, keep);
}