VCS[git]: Add 'Revert this chunk' context menu option to diff view.

Implement in git. Add infrastructure to revert single chhunks
by using patch -R. Currently only implemented in git since
only that has functionality to re-run diff.

Rubber-stamped-by: hunger <tobias.hunger@nokia.com>
This commit is contained in:
Friedemann Kleint
2011-03-24 15:44:39 +01:00
parent fbe9925d8c
commit 491a27163a
10 changed files with 251 additions and 21 deletions

View File

@@ -521,6 +521,8 @@ void GitClient::diff(const QString &workingDirectory,
editor = createVCSEditor(editorId, title,
workingDirectory, true, "originalFileName", workingDirectory, argWidget);
connect(editor, SIGNAL(diffChunkReverted(VCSBase::DiffChunk)), argWidget, SLOT(redoCommand()));
editor->setRevertDiffChunkEnabled(true);
}
editor->setDiffBaseDirectory(workingDirectory);
@@ -575,6 +577,8 @@ void GitClient::diff(const QString &workingDirectory,
userDiffArgs = argWidget->arguments();
editor = createVCSEditor(editorId, title, sourceFile, true, "originalFileName", sourceFile, argWidget);
connect(editor, SIGNAL(diffChunkReverted(VCSBase::DiffChunk)), argWidget, SLOT(redoCommand()));
editor->setRevertDiffChunkEnabled(true);
}
QStringList cmdArgs;