#
#
# patch "NEWS"
# from [0cc9be68e25d416c17409b19f0b78b5b41295d16]
# to [08b4223542062290738f3aad0016d321db36fa9d]
#
# patch "res/forms/preferences.ui"
# from [9898dad2631df0a8a5cb6f06fc5055160b7e24d2]
# to [f41d9efb43a747a29665f15756e80f097240c17f]
#
# patch "src/model/Inventory.cpp"
# from [5d271674ad247b34f192e59f414400c42112d508]
# to [7e768040639f70c5e29367a639f98c4f0a605cf1]
#
# patch "src/model/Inventory.h"
# from [b8192411cbd0363596148c33be1a2c13aa44165a]
# to [3a276b842f49014de39fd8426a23199ea715aaee]
#
# patch "src/view/dialogs/Preferences.cpp"
# from [7e739db6cbaa3d580ae5fd48c50e7ff022b8d64e]
# to [bd963181287a914a0bfcd545ef4c778c020b45b0]
#
============================================================
--- NEWS 0cc9be68e25d416c17409b19f0b78b5b41295d16
+++ NEWS 08b4223542062290738f3aad0016d321db36fa9d
@@ -10,7 +10,12 @@
- new: its now possible to actually copy the public key data to the clipboard
in the key management dialog
- new: possibility to display a file diff from the revision diff dialog
+ - improved: workspaces can now be read incrementally which is faster for
+ those with big directory trees and many files
- improved: input field in the select revision dialog now acts on ENTER
+ - improved: new simpler icon set which makes it easier to detect which files
+ have been changed in a workspace; also added a panel
+ (Window > Panels > Icon help) which contains explanations for all states
- bugfix: the workspace is now properly updated after a commit
- change: the proper monotone version is now solely determined by looking at
the output of interface version. An upper limit has been introduced for that
============================================================
--- res/forms/preferences.ui 9898dad2631df0a8a5cb6f06fc5055160b7e24d2
+++ res/forms/preferences.ui f41d9efb43a747a29665f15756e80f097240c17f
@@ -5,14 +5,12 @@
0
0
- 389
- 352
+ 368
+ 370
-
- 3
- 3
+
0
0
@@ -33,40 +31,76 @@
true
-
+
+ 6
+
+
9
-
- 6
+
+ 9
+
+ 9
+
+
+ 9
+
-
-
+
+ 6
+
+
0
-
- 6
+
+ 0
+
+ 0
+
+
+ 0
+
-
Path to monotone executable
-
+
+ 6
+
+
9
-
- 6
+
+ 9
+
+ 9
+
+
+ 9
+
-
-
+
+ 6
+
+
0
-
- 6
+
+ 0
+
+ 0
+
+
+ 0
+
-
@@ -98,20 +132,38 @@
Logging
-
+
+ 6
+
+
9
-
- 6
+
+ 9
+
+ 9
+
+
+ 9
+
-
-
+
+ 6
+
+
0
-
- 6
+
+ 0
+
+ 0
+
+
+ 0
+
-
@@ -131,12 +183,21 @@
-
-
+
+ 6
+
+
0
-
- 6
+
+ 0
+
+ 0
+
+
+ 0
+
-
@@ -173,12 +234,21 @@
Miscellaneous
-
+
+ 6
+
+
9
-
- 6
+
+ 9
+
+ 9
+
+
+ 9
+
-
@@ -189,17 +259,36 @@
+ -
+
+
+ read workspace incrementally (faster for big directory trees)
+
+
+ true
+
+
+
-
-
+
+ 6
+
+
0
-
- 6
+
+ 0
+
+ 0
+
+
+ 0
+
-
============================================================
--- src/model/Inventory.cpp 5d271674ad247b34f192e59f414400c42112d508
+++ src/model/Inventory.cpp 7e768040639f70c5e29367a639f98c4f0a605cf1
@@ -21,13 +21,13 @@
#include "Inventory.h"
#include "MonotoneUtil.h"
#include "BasicIOParser.h"
+#include "Settings.h"
#include
#include
Inventory::Inventory(QObject * parent)
- : QAbstractItemModel(parent), AutomateCommand(0), workspacePath(),
- readDirLevelsAhead(1)
+ : QAbstractItemModel(parent), AutomateCommand(0), workspacePath()
{
rootItem = new ModelItem("__root__");
rootItem->setParent(rootItem);
@@ -113,9 +113,15 @@ void Inventory::readInventory(const QStr
cmd << path;
}
- QStringList opts =
- QStringList() << "depth" << QString::number(readDirLevelsAhead);
+ QStringList opts;
+ // if requested, just read one directory level ahead
+ // (useful for big directory trees)
+ if (Settings::getBool("ReadWorkspaceIncrementally", true))
+ {
+ opts << "depth" << QString::number(1);
+ }
+
MonotoneTask task(cmd, opts);
AutomateCommand::enqueueWorkspaceTask(workspacePath, task);
}
@@ -240,8 +246,11 @@ void Inventory::setWorkspacePath()
{
QList children = rootItem->getChildren();
- I(children.size() > 0);
+ // the first item is the pseudo "cdup" item
+ int workspaceRootRow = 1;
+ I(children.size() > workspaceRootRow);
+
QString displayPath = workspacePath;
QString homePath = QDir::homePath();
if (workspacePath.indexOf(homePath) == 0)
@@ -249,9 +258,12 @@ void Inventory::setWorkspacePath()
displayPath = QDir(homePath).relativeFilePath(workspacePath);
displayPath.prepend("~/");
}
- children[0]->setLabel(displayPath);
+ children[workspaceRootRow]->setLabel(displayPath);
- emit dataChanged(index(0, 0, QModelIndex()), index(0, 2, QModelIndex()));
+ emit dataChanged(
+ index(workspaceRootRow, 0, QModelIndex()),
+ index(workspaceRootRow, 2, QModelIndex())
+ );
}
QModelIndex Inventory::index(int row, int column, const QModelIndex & parent) const
============================================================
--- src/model/Inventory.h b8192411cbd0363596148c33be1a2c13aa44165a
+++ src/model/Inventory.h 3a276b842f49014de39fd8426a23199ea715aaee
@@ -62,7 +62,6 @@ private:
QString branchName;
QMap itemMap;
WorkspacePath workspacePath;
- int readDirLevelsAhead;
private slots:
void setWorkspacePath();
============================================================
--- src/view/dialogs/Preferences.cpp 7e739db6cbaa3d580ae5fd48c50e7ff022b8d64e
+++ src/view/dialogs/Preferences.cpp bd963181287a914a0bfcd545ef4c778c020b45b0
@@ -61,6 +61,11 @@ Preferences::Preferences(QWidget * paren
Qt::Checked : Qt::Unchecked
);
+ readWorkspaceIncrementally->setCheckState(
+ Settings::getBool("ReadWorkspaceIncrementally", true) ?
+ Qt::Checked : Qt::Unchecked
+ );
+
connect(
selectMtnExecutable, SIGNAL(clicked()),
this, SLOT(openFileBrowser())
@@ -117,6 +122,19 @@ void Preferences::accept()
Settings::setBool("CheckForUpdates", checkForUpdates->isChecked());
+ if (Settings::getBool("ReadWorkspaceIncrementally", true) !=
+ readWorkspaceIncrementally->isChecked())
+ {
+ QMessageBox::information(
+ this,
+ tr("Notice"),
+ tr("You need to reload your workspace(s) in order to apply this new setting."),
+ QMessageBox::Ok
+ );
+ Settings::setBool("ReadWorkspaceIncrementally",
+ readWorkspaceIncrementally->isChecked());
+ }
+
done(QDialog::Accepted);
}