VCS[git], CodePaster: Add support for applying patches.

Modify CodePaster::fetch to do a mimetype detection on the
content, create a filename with the matching extension and
open that file.
This gives correct syntax highlighting  and makes "Save as"
more convenient. Keep the file around and delete on exit.

Modify patch mimetype with some content detection (higher priority
than C++).

Add a "current patch file" to the VCSBasePlugin::State. Add "Apply
patch" to git with whitespace fix.
This commit is contained in:
Friedemann Kleint
2010-03-25 16:23:37 +01:00
parent 37acb3b8d1
commit de28b61cca
9 changed files with 301 additions and 13 deletions

View File

@@ -106,6 +106,7 @@ public:
const QStringList &files = QStringList(),
QString *errorMessage = 0);
bool synchronousCleanList(const QString &workingDirectory, QStringList *files, QString *errorMessage);
bool synchronousApplyPatch(const QString &workingDirectory, const QString &file, QString *errorMessage);
bool synchronousInit(const QString &workingDirectory);
bool synchronousCheckoutFiles(const QString &workingDirectory,
QStringList files = QStringList(),