[Pkg-owncloud-commits] [owncloud-client] 66/332: Merge branch 'master' of https://github.com/owncloud/mirall into dark-eye-master
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 3406fcdce4f067541e430108ff39b979afdebb97
Merge: cd82a85 abf0f90
Author: Eran <etherpulse at gmail.com>
Date: Fri Jun 6 18:56:58 2014 +0300
Merge branch 'master' of https://github.com/owncloud/mirall into dark-eye-master
Conflicts:
src/mirall/progressdispatcher.h
CMakeLists.txt | 13 +-
ChangeLog | 19 +-
VERSION.cmake | 4 +-
admin/win/nsi/l10n/Greek.nsh | 20 +-
admin/win/nsi/l10n/Hungarian.nsh | 12 +-
admin/win/nsi/l10n/Italian.nsh | 2 +-
admin/win/nsi/l10n/SpanishInternational.nsh | 44 ++
admin/win/nsi/l10n/Turkish.nsh | 2 +-
admin/win/nsi/l10n/languages.nsh | 1 +
cmake/modules/FindNeon.cmake | 2 +-
cmake/modules/FindSQLite3.cmake | 2 +-
cmake/modules/NSIS.template.in | 6 +
cmake/modules/QtVersionAbstraction.cmake | 26 +-
csync/CMakeLists.txt | 14 +-
csync/src/CMakeLists.txt | 18 +-
csync/src/csync.c | 196 ++-----
csync/src/csync.h | 109 +---
csync/src/csync_exclude.c | 22 +-
csync/src/csync_misc.c | 46 --
csync/src/csync_misc.h | 2 -
csync/src/csync_owncloud.c | 562 +++++++-------------
csync/src/csync_owncloud.h | 159 +-----
.../{csync_owncloud.h => csync_owncloud_private.h} | 146 +++---
csync/src/csync_owncloud_recursive_propfind.c | 118 ++---
csync/src/csync_owncloud_util.c | 142 ++++-
csync/src/csync_private.h | 22 +-
csync/src/csync_reconcile.c | 21 +-
csync/src/csync_statedb.c | 28 +-
csync/src/csync_update.c | 40 +-
csync/src/csync_util.c | 66 +--
csync/src/csync_util.h | 4 +-
csync/src/std/CMakeLists.txt | 2 -
csync/src/std/c_dir.c | 189 -------
csync/src/std/c_dir.h | 86 ----
csync/src/std/c_file.c | 346 -------------
csync/src/std/c_file.h | 102 ----
csync/src/std/c_lib.h | 36 --
csync/src/std/c_macro.h | 3 -
csync/src/std/c_path.c | 156 ------
csync/src/std/c_path.h | 22 -
csync/src/std/c_string.c | 63 ---
csync/src/std/c_string.h | 31 --
csync/src/vio/csync_vio.c | 29 +-
csync/src/vio/csync_vio.h | 3 -
csync/src/vio/csync_vio_file_stat.c | 18 +-
csync/src/vio/csync_vio_file_stat.h | 35 +-
csync/src/vio/csync_vio_local.c | 14 +-
csync/tests/CMakeLists.txt | 2 -
csync/tests/csync_tests/check_csync_commit.c | 6 -
csync/tests/csync_tests/check_csync_create.c | 3 -
csync/tests/csync_tests/check_csync_exclude.c | 8 -
csync/tests/csync_tests/check_csync_init.c | 6 -
csync/tests/csync_tests/check_csync_log.c | 3 -
csync/tests/csync_tests/check_csync_statedb_load.c | 2 -
.../tests/csync_tests/check_csync_statedb_query.c | 19 -
csync/tests/csync_tests/check_csync_update.c | 15 -
csync/tests/ownCloud/t1.pl | 38 +-
csync/tests/ownCloud/t3.pl | 10 +
csync/tests/std_tests/check_std_c_dir.c | 176 -------
csync/tests/std_tests/check_std_c_file.c | 180 -------
csync/tests/std_tests/check_std_c_path.c | 27 -
csync/tests/std_tests/check_std_c_str.c | 86 ----
doc/CMakeLists.txt | 15 +-
doc/troubleshooting.rst | 22 +
src/3rdparty/qtlockedfile/README.txt | 2 +-
src/3rdparty/qtlockedfile/qtlockedfile.cpp | 41 +-
src/3rdparty/qtlockedfile/qtlockedfile.h | 41 +-
src/3rdparty/qtlockedfile/qtlockedfile.pri | 11 +
src/3rdparty/qtlockedfile/qtlockedfile_unix.cpp | 42 +-
src/3rdparty/qtlockedfile/qtlockedfile_win.cpp | 44 +-
src/3rdparty/qtsingleapplication/README.txt | 2 +-
src/3rdparty/qtsingleapplication/qtlocalpeer.cpp | 82 +--
src/3rdparty/qtsingleapplication/qtlocalpeer.h | 53 +-
.../qtsingleapplication/qtsingleapplication.cpp | 202 ++++----
.../qtsingleapplication/qtsingleapplication.h | 80 ++-
.../qtsingleapplication/qtsingleapplication.pri | 15 +
.../qtsinglecoreapplication.cpp | 49 +-
.../qtsingleapplication/qtsinglecoreapplication.h | 45 +-
.../qtsinglecoreapplication.pri | 14 +
src/CMakeLists.txt | 83 +--
src/creds/abstractcredentials.h | 4 +-
src/creds/credentialsfactory.cpp | 1 +
src/creds/credentialsfactory.h | 6 +-
src/creds/httpcredentials.cpp | 6 +-
src/creds/httpcredentials.h | 2 +-
src/creds/shibboleth/shibbolethaccessmanager.cpp | 55 --
src/creds/shibboleth/shibbolethaccessmanager.h | 43 --
src/creds/shibboleth/shibbolethconfigfile.cpp | 104 ----
src/creds/shibboleth/shibbolethconfigfile.h | 38 --
src/creds/shibboleth/shibbolethcookiejar.cpp | 34 --
src/creds/shibboleth/shibbolethcookiejar.h | 41 --
src/creds/shibboleth/shibbolethuserjob.cpp | 2 +-
src/creds/shibboleth/shibbolethwebview.cpp | 91 ++--
src/creds/shibboleth/shibbolethwebview.h | 15 +-
src/creds/shibbolethcredentials.cpp | 180 ++++---
src/creds/shibbolethcredentials.h | 23 +-
src/creds/tokencredentials.cpp | 28 +-
src/creds/tokencredentials.h | 2 +-
src/main.cpp | 22 +
src/mirall/account.cpp | 18 +-
src/mirall/account.h | 8 +-
src/mirall/accountsettings.cpp | 28 +-
src/mirall/application.cpp | 25 +-
src/mirall/application.h | 6 +-
src/mirall/clientproxy.h | 3 +-
src/mirall/connectionvalidator.h | 3 +-
src/mirall/cookiejar.cpp | 155 ++++++
src/mirall/cookiejar.h | 47 ++
src/mirall/folder.cpp | 151 ++++--
src/mirall/folder.h | 23 +-
src/mirall/folderman.cpp | 36 +-
src/mirall/folderman.h | 11 +-
src/mirall/folderwatcher.cpp | 4 +-
src/mirall/folderwizard.cpp | 2 +-
src/mirall/logger.cpp | 33 +-
src/mirall/logger.h | 12 +-
src/mirall/mirallaccessmanager.cpp | 5 +-
src/mirall/mirallaccessmanager.h | 3 +-
src/mirall/mirallconfigfile.cpp | 20 +-
src/mirall/mirallconfigfile.h | 5 +-
src/mirall/networkjobs.cpp | 1 -
src/mirall/networkjobs.h | 18 +-
src/mirall/owncloudpropagator.cpp | 112 +++-
src/mirall/owncloudpropagator.h | 21 +-
src/mirall/owncloudsetupwizard.cpp | 10 +-
src/mirall/owncloudtheme.cpp | 9 +-
src/mirall/progressdispatcher.cpp | 4 +-
src/mirall/progressdispatcher.h | 35 +-
src/mirall/propagator_legacy.cpp | 23 +-
src/mirall/propagator_qnam.cpp | 200 ++++++--
src/mirall/propagator_qnam.h | 28 +-
src/mirall/propagatorjobs.cpp | 63 ++-
src/mirall/propagatorjobs.h | 10 +
src/mirall/settingsdialogmac.cpp | 4 -
src/mirall/socketapi.cpp | 184 ++++---
src/mirall/socketapi.h | 10 +-
src/mirall/sslbutton.cpp | 2 +-
src/mirall/syncengine.cpp | 66 ++-
src/mirall/syncengine.h | 9 +-
src/mirall/syncfileitem.h | 5 +-
src/mirall/syncjournaldb.cpp | 74 ++-
src/mirall/syncjournaldb.h | 17 +-
src/mirall/syncjournalfilerecord.cpp | 16 +-
src/mirall/syncresult.h | 3 +-
src/mirall/theme.cpp | 9 +-
src/mirall/theme.h | 6 +-
src/mirall/utility.cpp | 42 +-
src/mirall/utility.h | 53 +-
src/mirall/utility_unix.cpp | 2 +-
src/owncloudcmd/owncloudcmd.cpp | 16 +-
src/owncloudcmd/owncloudcmd.h | 31 ++
src/wizard/owncloudshibbolethcredspage.cpp | 78 +--
src/wizard/owncloudshibbolethcredspage.h | 11 +-
sync-exclude.lst | 1 +
test/testfolderwatcher.h | 5 +-
translations/mirall_ca.ts | 426 ++++++++-------
translations/mirall_cs.ts | 406 ++++++++-------
translations/mirall_de.ts | 404 ++++++++-------
translations/mirall_el.ts | 414 ++++++++-------
translations/mirall_en.ts | 396 +++++++-------
translations/mirall_es.ts | 420 ++++++++-------
translations/mirall_es_AR.ts | 398 +++++++-------
translations/mirall_et.ts | 418 ++++++++-------
translations/mirall_eu.ts | 422 ++++++++-------
translations/mirall_fa.ts | 396 +++++++-------
translations/mirall_fi.ts | 418 ++++++++-------
translations/mirall_fr.ts | 398 +++++++-------
translations/mirall_gl.ts | 402 ++++++++-------
translations/mirall_hu.ts | 396 +++++++-------
translations/mirall_it.ts | 400 ++++++++-------
translations/mirall_ja.ts | 457 +++++++++--------
translations/mirall_nl.ts | 396 +++++++-------
translations/mirall_pl.ts | 398 +++++++-------
translations/mirall_pt.ts | 443 ++++++++--------
translations/mirall_pt_BR.ts | 426 ++++++++-------
translations/mirall_ru.ts | 414 ++++++++-------
translations/mirall_sk.ts | 551 +++++++++++---------
translations/mirall_sl.ts | 404 ++++++++-------
translations/mirall_sv.ts | 412 ++++++++-------
translations/mirall_th.ts | 396 +++++++-------
translations/mirall_tr.ts | 523 ++++++++++---------
translations/mirall_uk.ts | 396 +++++++-------
translations/mirall_zh_CN.ts | 570 +++++++++++----------
translations/mirall_zh_TW.ts | 396 +++++++-------
184 files changed, 9423 insertions(+), 9773 deletions(-)
diff --cc src/mirall/progressdispatcher.h
index 64baabf,603be1b..a3a1e0a
--- a/src/mirall/progressdispatcher.h
+++ b/src/mirall/progressdispatcher.h
@@@ -42,98 -43,29 +43,95 @@@ namespace Progres
quint64 _totalSize;
quint64 _completedFileCount;
quint64 _completedSize;
-
+ // Should this be in a separate file?
+ struct EtaEstimate {
+ EtaEstimate() : _startedTime(QDateTime::currentMSecsSinceEpoch()), _agvEtaMSecs(0),_effectivProgressPerSec(0),_sampleCount(1) {}
+
+ static const int MAX_AVG_DIVIDER=60;
+ static const int INITAL_WAIT_TIME=5;
+
+ quint64 _startedTime ;
+ quint64 _agvEtaMSecs;
+ quint64 _effectivProgressPerSec;
+ float _sampleCount;
+
+ /**
+ * reset the estiamte.
+ */
+ void reset() {
+ _startedTime = QDateTime::currentMSecsSinceEpoch();
+ _sampleCount =1;
+ _effectivProgressPerSec = _agvEtaMSecs = 0;
+ }
+
+ /**
+ * update the estimated eta time with more current data.
+ * @param quint64 completed the amount the was completed.
+ * @param quint64 total the total amout that should be completed.
+ */
+ void updateTime(quint64 completed, quint64 total) {
+ quint64 elapsedTime = QDateTime::currentMSecsSinceEpoch() - this->_startedTime ;
+ //don't start until you have some good data to process, prevents jittring estiamtes at the start of the syncing process
+ if(total != 0 && completed != 0 && elapsedTime > INITAL_WAIT_TIME ) {
+ if(_sampleCount < MAX_AVG_DIVIDER) { _sampleCount+=0.01f; }
+ // (elapsedTime-1) is an hack to avoid float "rounding" issue (ie. 0.99999999999999999999....)
+ _agvEtaMSecs = _agvEtaMSecs + (((static_cast<float>(total) / completed) * elapsedTime) - (elapsedTime-1)) - this->getEtaEstimate();
+ _effectivProgressPerSec = ( total - completed ) / (1+this->getEtaEstimate()/1000);
+ }
+ }
+
+ /**
+ * Get the eta estimate in milliseconds
+ * @return quint64 the estimate amount of milliseconds to end the process.
+ */
+ quint64 getEtaEstimate() const {
+ return _agvEtaMSecs / _sampleCount;
+ }
+
+ /**
+ * Get the estimated average bandwidth usage.
+ * @return quint64 the estimated bandwidth usage in bytes.
+ */
+ quint64 getEstimatedBandwidth() const {
+ return _effectivProgressPerSec;
+ }
+ };
+ EtaEstimate _totalEtaEstimate;
-
struct ProgressItem {
ProgressItem() : _completedSize(0) {}
SyncFileItem _item;
quint64 _completedSize;
+ EtaEstimate _etaEstimate;
-
};
QHash<QString, ProgressItem> _currentItems;
SyncFileItem _lastCompletedItem;
void setProgressComplete(const SyncFileItem &item) {
_currentItems.remove(item._file);
- if (Progress::isSizeDependent(item._instruction)) {
- _completedSize += item._size;
+ if (!item._isDirectory) {
+ _completedFileCount++;
- if (Progress::isSizeDependent(item._instruction)) {
- _completedSize += item._size;
- }
++ if (Progress::isSizeDependent(item._instruction)) {
++ _completedSize += item._size;
++ }
}
- _completedFileCount++;
- _lastCompletedItem = item;
+ _lastCompletedItem = item;
+ this->updateEstimation();
}
-
void setProgressItem(const SyncFileItem &item, quint64 size) {
_currentItems[item._file]._item = item;
- _currentItems[item._file]._completedSize = size;
+ _currentItems[item._file]._completedSize = size;
_lastCompletedItem = SyncFileItem();
-
+ this->updateEstimation();
+ _currentItems[item._file]._etaEstimate.updateTime(size,item._size);
+ }
+
+ void updateEstimation() {
+ if(this->_totalSize > 0) {
+ _totalEtaEstimate.updateTime(this->completedSize(),this->_totalSize);
+ } else {
+ _totalEtaEstimate.updateTime(this->_completedFileCount,this->_totalFileCount);
+ }
}
quint64 completedSize() const {
@@@ -143,29 -76,12 +142,27 @@@
}
return r;
}
-
+ /**
+ * Get the total completion estimate structure
+ * @return EtaEstimate a structure containing the total completion information.
+ */
+ EtaEstimate totalEstimate() const {
+ return _totalEtaEstimate;
+ }
+
+ /**
+ * Get the current file completion estimate structure
+ * @return EtaEstimate a structure containing the current file completion information.
+ */
+ EtaEstimate getFileEstimate(const SyncFileItem &item) const {
+ return _currentItems[item._file]._etaEstimate;
+ }
-
};
- QString asActionString( const SyncFileItem& item );
- QString asResultString( const SyncFileItem& item );
+ OWNCLOUDSYNC_EXPORT QString asActionString( const SyncFileItem& item );
+ OWNCLOUDSYNC_EXPORT QString asResultString( const SyncFileItem& item );
- bool isWarningKind( SyncFileItem::Status );
+ OWNCLOUDSYNC_EXPORT bool isWarningKind( SyncFileItem::Status );
}
@@@ -196,6 -113,11 +193,10 @@@ signals
*/
void progressInfo( const QString& folder, const Progress::Info& progress );
-
+ /**
+ * @brief: the item's job is completed
+ */
+ void jobCompleted(const QString &folder, const SyncFileItem & item);
protected:
void setProgressInfo(const QString& folder, const Progress::Info& progress);
diff --cc src/mirall/utility.h
index 2e21d79,c893001..cfe1fd0
--- a/src/mirall/utility.h
+++ b/src/mirall/utility.h
@@@ -51,32 -52,28 +52,38 @@@ namespace Utilit
* @param unit an optional unit that is appended if present.
* @return the formatted string.
*/
- QString compactFormatDouble(double value, int prec, const QString& unit = QString::null);
+ OWNCLOUDSYNC_EXPORT QString compactFormatDouble(double value, int prec, const QString& unit = QString::null);
// porting methods
- QString escape(const QString&);
- QString dataLocation();
+ OWNCLOUDSYNC_EXPORT QString escape(const QString&);
+ OWNCLOUDSYNC_EXPORT QString dataLocation();
// conversion function QDateTime <-> time_t (because the ones builtin work on only unsigned 32bit)
- QDateTime qDateTimeFromTime_t(qint64 t);
- qint64 qDateTimeToTime_t(const QDateTime &t);
+ OWNCLOUDSYNC_EXPORT QDateTime qDateTimeFromTime_t(qint64 t);
+ OWNCLOUDSYNC_EXPORT qint64 qDateTimeToTime_t(const QDateTime &t);
+
+ /**
+ * @brief Convert milliseconds to HMS string.
+ * @param quint64 msecs the milliseconds to convert to string.
+ * @param uint precision the amount of sub dviving scale to include in the result.
+ * @return an HMS representation of the milliseconds value.
+ */
+ QString timeToDescriptiveString(QList<QPair<QString,quint32> > &timeMapping, quint64 msecs, quint8 precision, QString separator, bool specific);
+ QString timeToDescriptiveString(quint64 msecs, quint8 precision, QString separator, bool specific);
+
// convinience OS detection methods
- bool isWindows();
- bool isMac();
- bool isUnix();
- bool isLinux(); // use with care
+ OWNCLOUDSYNC_EXPORT bool isWindows();
+ OWNCLOUDSYNC_EXPORT bool isMac();
+ OWNCLOUDSYNC_EXPORT bool isUnix();
+ OWNCLOUDSYNC_EXPORT bool isLinux(); // use with care
+
+ // Case preserving file system underneath?
+ // if this function returns true, the file system is case preserving,
+ // that means "test" means the same as "TEST" for filenames.
+ // if false, the two cases are two different files.
+ OWNCLOUDSYNC_EXPORT bool fsCasePreserving();
class StopWatch {
private:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list