SVN: Show conflicted files in submit editor

So far, they didn't show up in the submit editor,
so they could be forgotten during a commit.

Unlike Git, these files don't prohibit the commit,
but at least are shown in the list of modified files
and can be diffed.

Change-Id: Ia5cac7befb870321d2048622c1fac022d979c745
Reviewed-by: Hugues Delorme <delorme.hugues@fougue.pro>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Andre Hartmann
2016-05-20 19:20:49 +02:00
committed by André Hartmann
parent 5d3823ac47
commit a5b7ba58f0
4 changed files with 16 additions and 13 deletions

View File

@@ -133,7 +133,7 @@ static inline QString debugCodec(const QTextCodec *c)
return c ? QString::fromLatin1(c->name()) : QString::fromLatin1("Null codec");
}
// Parse "svn status" output for added/modified/deleted files
// Parse "svn status" output for added/conflicted/deleted/modified files
// "M<7blanks>file"
typedef QList<SubversionSubmitEditor::StatusFilePair> StatusList;
@@ -145,8 +145,9 @@ StatusList parseStatusOutput(const QString &output)
foreach (const QString &l, list) {
const QString line =l.trimmed();
if (line.size() > 8) {
const QChar state = line.at(0);
if (state == QLatin1Char('A') || state == QLatin1Char('D') || state == QLatin1Char('M')) {
const QString state = line.left(1);
if (state == FileAddedC || state == FileConflictedC
|| state == FileDeletedC || state == FileModifiedC) {
const QString fileName = line.mid(7); // Column 8 starting from svn 1.6
changeSet.push_back(SubversionSubmitEditor::StatusFilePair(QString(state), fileName.trimmed()));
}