# # # patch "guitone.pro" # from [c0f6eb76f1780896bafb2e28e4a986ff0a49871a] # to [94d28e1f978ab95413a81a79f9875f47a35c5568] # # patch "src/model/Inventory.cpp" # from [15dd6ea31d2282d321a55da16e14f63fbb452214] # to [0ea3c180af066fa870dd0d1fb24b15f524682b58] # # patch "src/model/InventoryItem.cpp" # from [f37721d4b5f0b5656e7969d381ebf003a9d120ac] # to [24fa3cfb08bc571383fd8917f6b9c0670c15854f] # # patch "src/model/InventoryItem.h" # from [938dd7727633951c9ac80d40d358310db7708b19] # to [d12b8e0ac122d45e23670a363b67e509f860372f] # ============================================================ --- guitone.pro c0f6eb76f1780896bafb2e28e4a986ff0a49871a +++ guitone.pro 94d28e1f978ab95413a81a79f9875f47a35c5568 @@ -1,9 +1,9 @@ # # global version strings # -GUITONE_VERSION = "0.7" -MIN_MTN_INT_VERSION = "6.0" -MAX_MTN_INT_VERSION = "7.0" +GUITONE_VERSION = "0.8" +MIN_MTN_INT_VERSION = "7.0" +MAX_MTN_INT_VERSION = "8.0" # # common configuration ============================================================ --- src/model/Inventory.cpp 15dd6ea31d2282d321a55da16e14f63fbb452214 +++ src/model/Inventory.cpp 0ea3c180af066fa870dd0d1fb24b15f524682b58 @@ -79,6 +79,12 @@ bool Inventory::canFetchMore(const QMode return false; } + if (invitem->isAboutToBeExpanded()) + { + D(QString("skipping %1 (about to be expanded)").arg(item->getLabel())); + return false; + } + return true; } @@ -101,26 +107,12 @@ void Inventory::fetchMore(const QModelIn return; } - // mtn currently allows to restrict on ignored, but not on unknown - // paths, check that! - if (invitem->hasStatus(InventoryItem::Unknown)) - { - D(QString("skipping %1 (unknown path)").arg(invitem->getPath())); - return; - } - - // 'inventory' can only be restricted with existing file paths - // and not with invalid file/directory combinations or missing paths - // restricting to single files makes no sense for us here either - if (invitem->getFSType() == InventoryItem::None) - { - D(QString("skipping %1 (not an existing path)").arg(invitem->getPath())); - return; - } - // again, if this item is already expanded, don't expand it again - if (invitem->isExpanded(QueryLevel)) return; + if (invitem->isExpanded(QueryLevel) || + invitem->isAboutToBeExpanded()) return; + invitem->setAboutToBeExpanded(); + readInventory(invitem->getPath()); } @@ -141,6 +133,7 @@ void Inventory::readInventory(const QStr if (Settings::getBool("ReadWorkspaceIncrementally", false)) { opts << "depth" << QString::number(QueryLevel); + opts << "no-corresponding-renames" << QString(); } MonotoneTask task(cmd, opts); ============================================================ --- src/model/InventoryItem.cpp f37721d4b5f0b5656e7969d381ebf003a9d120ac +++ src/model/InventoryItem.cpp 24fa3cfb08bc571383fd8917f6b9c0670c15854f @@ -163,7 +163,7 @@ InventoryItem::InventoryItem(const Stanz InventoryItem::InventoryItem(const Stanza & stanza) : ModelItem(), fs_type(Undefined), old_type(Undefined), new_type(Undefined), - status(0), expanded(false) + status(0), expanded(false), aboutToBeExpanded(false) { foreach (StanzaEntry en, stanza) { @@ -525,3 +525,20 @@ bool InventoryItem::isExpanded(int level return true; } +bool InventoryItem::isAboutToBeExpanded() const +{ + return aboutToBeExpanded; +} + +void InventoryItem::setAboutToBeExpanded() +{ + aboutToBeExpanded = true; + + // set the dirty status for all current descendants as well + foreach (ModelItem * child, children) + { + InventoryItem * invitem = dynamic_cast(child); + if (!invitem) continue; + invitem->setAboutToBeExpanded(); + } +} ============================================================ --- src/model/InventoryItem.h 938dd7727633951c9ac80d40d358310db7708b19 +++ src/model/InventoryItem.h d12b8e0ac122d45e23670a363b67e509f860372f @@ -112,6 +112,9 @@ public: void setExpanded(); bool isExpanded(int) const; + void setAboutToBeExpanded(); + bool isAboutToBeExpanded() const; + int getStatusRecursive() const; bool hasChangedRecursive() const; @@ -140,6 +143,7 @@ private: int status; bool expanded; + bool aboutToBeExpanded; }; #endif