# # # patch "src/model/GetBranchLog.cpp" # from [b118e62e7355a8e0f6bfe6178e304d4f30f54122] # to [4cf2d86184a2313f82aee37e89322e56c19301ad] # # patch "src/model/GetBranchLog.h" # from [9574b2dab0fafa4a8bc35c99bd927f0815f50dc2] # to [159c835166a57a1642024e784f1373f041e1de80] # ============================================================ --- src/model/GetBranchLog.cpp b118e62e7355a8e0f6bfe6178e304d4f30f54122 +++ src/model/GetBranchLog.cpp 4cf2d86184a2313f82aee37e89322e56c19301ad @@ -109,6 +109,23 @@ void GetBranchLog::processTaskResult(con if (current == "toposort") { QStringList revs = output.split("\n", QString::SkipEmptyParts); + + // there is a small race condition where readNext() already processes + // one of the next revisions before they're sorted, so we just have + // to remove that from the sorted list; also additional revisions might + // exist which we append at the end + QStringList processed; + foreach (const QString & rev, revs) + { + if (nextRevs.value(currentBranch).contains(rev)) + processed.append(rev); + } + foreach (const QString & rev, nextRevs.value(currentBranch)) + { + if (!revs.contains(rev)) + processed.append(rev); + } + I(nextRevs[currentBranch].size() == revs.size()); nextRevs[currentBranch] = revs; ============================================================ --- src/model/GetBranchLog.h 9574b2dab0fafa4a8bc35c99bd927f0815f50dc2 +++ src/model/GetBranchLog.h 159c835166a57a1642024e784f1373f041e1de80 @@ -56,7 +56,7 @@ private: DatabaseFile databaseFile; QMap revisionMap; QMap certMap; - QMap > nextRevs; + QMap nextRevs; QSet mergeRevs; QString currentBranch;