# # # patch "NEWS" # from [1c169dfc4599d4ea266a86ffffcec3bb77db7ecd] # to [7ffd86529fd506e5d5d64732c077d144c772645c] # # patch "src/model/InventoryWatcher.cpp" # from [b629ad57dc862ea587684bafaf11050ed8f5cf77] # to [f7bbca911f47fafb1ceeafbd8ae6f02e1b55005e] # ============================================================ --- NEWS 1c169dfc4599d4ea266a86ffffcec3bb77db7ecd +++ NEWS 7ffd86529fd506e5d5d64732c077d144c772645c @@ -7,6 +7,9 @@ interface. - bugfix: no longer crash the changeset browser when a database contains no revisions and the user clicks on "more/all changes" + - bugfix: if _MTN/revision can't be read or parsed (for whatever reason), + don't abort the program. Instead, log a critical message and try it again + next time. 2008-10-04 (0.9) - new: panel to inspect an selected workspace item - shows several mtn and ============================================================ --- src/model/InventoryWatcher.cpp b629ad57dc862ea587684bafaf11050ed8f5cf77 +++ src/model/InventoryWatcher.cpp f7bbca911f47fafb1ceeafbd8ae6f02e1b55005e @@ -44,7 +44,7 @@ void InventoryWatcher::setWorkspacePath( QFile file(revPath); if (!file.open(QIODevice::ReadOnly)) { - F(QString("cannot open %1/_MTN/revision for reading").arg(workspace)); + C(QString("cannot open %1/_MTN/revision for reading").arg(workspace)); } QString contents(file.readAll()); file.close(); @@ -52,7 +52,7 @@ void InventoryWatcher::setWorkspacePath( BasicIOParser parser(contents); if (!parser.parse()) { - F("could not parse contents of _MTN/revision"); + C("could not parse contents of _MTN/revision"); } oldRevisionEntries = parser.getStanzas(); addPath(revPath); @@ -106,7 +106,8 @@ void InventoryWatcher::checkForBookkeepC QFile file(workspace + "/_MTN/revision"); if (!file.open(QIODevice::ReadOnly)) { - F(QString("cannot open %1/_MTN/revision for reading").arg(workspace)); + C(QString("cannot open %1/_MTN/revision for reading").arg(workspace)); + return; } QString contents(file.readAll()); file.close(); @@ -114,7 +115,8 @@ void InventoryWatcher::checkForBookkeepC BasicIOParser parser(contents); if (!parser.parse()) { - F("could not parse contents of _MTN/revision"); + C("could not parse contents of _MTN/revision"); + return; } StanzaList newRevisionEntries = parser.getStanzas();