# # # patch "NEWS" # from [a8f476eb2e59b4bed8618526f4d7c5c48d35de8e] # to [6ead724a7379205ccece7d5efda01a5ce59a9307] # # patch "src/model/GetBranchLog.cpp" # from [dffad69f432f8b3092213ef263bac4a9a1f524d6] # to [fa62d0f8a15100ef6e0b009e1b95c3d6e25e7517] # # patch "src/model/GetBranchLog.h" # from [fd90592e93fa215361bfd6e9f9c7574c138a2fd6] # to [682e6a743815ebff68c6d24d75cbbdfd0af6a4e2] # ============================================================ --- NEWS a8f476eb2e59b4bed8618526f4d7c5c48d35de8e +++ NEWS 6ead724a7379205ccece7d5efda01a5ce59a9307 @@ -16,6 +16,8 @@ - new: actually renames items in the "unaccounted renames" dialog - new: link to monotone manual from the help menu (FS#23) - improved: lighter, more eye-friendly colors for diff views (FS#24) + - bugfix: the changeset browser is now able to browse branches with no + hierarchical history (i.e. zero ancestors) (FS#29) - bugfix: guitone no longer considers the workspace to be invalid if the last file is physically removed from it. Also, the amount of inventory reloads has been lowered since we only notify about changed paths every 500ms ============================================================ --- src/model/GetBranchLog.cpp dffad69f432f8b3092213ef263bac4a9a1f524d6 +++ src/model/GetBranchLog.cpp fa62d0f8a15100ef6e0b009e1b95c3d6e25e7517 @@ -28,12 +28,17 @@ GetBranchLog::GetBranchLog(QObject * par connect( selectModel, SIGNAL(selectionRead()), - this, SLOT(selectionReady()) + this, SLOT(selectionRead()) ); connect( + ancestorModel, SIGNAL(ancestorsRead()), + this, SLOT(ancestorsRead()) + ); + + connect( revSortModel, SIGNAL(sortingFinished()), - this, SLOT(revisionsReady()) + this, SLOT(sortingFinished()) ); selectModel->readSelection("h:" + branch); @@ -46,9 +51,8 @@ GetBranchLog::~GetBranchLog() delete ancestorModel; } -void GetBranchLog::selectionReady() +void GetBranchLog::selectionRead() { - QStringList heads; int count = selectModel->rowCount(QModelIndex()); for (int i = 0; i < count; i++) @@ -60,12 +64,23 @@ void GetBranchLog::selectionReady() ).toString() ); } - revisions += heads; + ancestorModel->readAncestors(heads); } -void GetBranchLog::revisionsReady() +void GetBranchLog::ancestorsRead() { + // if we could not query any ancestors, the sorting won't succeed, + // but we still have this one single (or multiple) head revisions + // we want to show the user + if (ancestorModel->rowCount(QModelIndex()) == 0) + { + emit branchLogRead(branch, heads); + } +} + +void GetBranchLog::sortingFinished() +{ int count = revSortModel->rowCount(QModelIndex()); for (int i = 0; i < count; i++) { @@ -80,6 +95,7 @@ void GetBranchLog::revisionsReady() ).toString() ); } - emit branchLogRead(branch, revisions); + + emit branchLogRead(branch, heads + revisions); } ============================================================ --- src/model/GetBranchLog.h fd90592e93fa215361bfd6e9f9c7574c138a2fd6 +++ src/model/GetBranchLog.h 682e6a743815ebff68c6d24d75cbbdfd0af6a4e2 @@ -36,14 +36,16 @@ private: private: QString branch; DatabaseFile databaseFile; + QStringList heads; QStringList revisions; Select * selectModel; Toposort * revSortModel; Ancestors * ancestorModel; private slots: - void selectionReady(); - void revisionsReady(); + void selectionRead(); + void ancestorsRead(); + void sortingFinished(); }; #endif