[Pkg-owncloud-commits] [owncloud-client] 30/333: Merge branch 'master' into parallel_upload

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Apr 17 23:16:30 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 a4442ebb4087726e1b4fedff4bf735716b2f3e83
Merge: f35b1f8 93f31fa
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Feb 12 16:50:45 2014 +0100

    Merge branch 'master' into parallel_upload
    
    Conflicts:
    	src/mirall/owncloudpropagator.cpp
    	src/mirall/owncloudpropagator.h

 README.md                                  |   3 +-
 admin/win/nsi/l10n/Czech.nsh               |   4 +-
 admin/win/nsi/l10n/Estonian.nsh            |   6 +-
 admin/win/nsi/l10n/German.nsh              |   2 +-
 admin/win/nsi/l10n/Greek.nsh               |   6 +-
 admin/win/nsi/l10n/Japanese.nsh            |  10 +-
 admin/win/nsi/l10n/Polish.nsh              |  68 ++++-----
 admin/win/nsi/l10n/Russian.nsh             |   6 +-
 admin/win/nsi/l10n/Slovenian.nsh           |   6 +-
 admin/win/nsi/l10n/languages.nsh           |   4 +-
 cmake/modules/AddAppIconMacro.cmake        |   2 +-
 cmake/modules/NSIS.template.in             |   2 +-
 cmake/modules/QtVersionAbstraction.cmake   |   2 +-
 csync/src/CMakeLists.txt                   |   1 -
 csync/src/csync_dbtree.c                   | 235 -----------------------------
 csync/src/csync_dbtree.h                   |  60 --------
 csync/src/csync_reconcile.c                |  35 ++---
 csync/src/csync_rename.cc                  |  13 --
 csync/src/csync_statedb.c                  | 188 +++++++++++++++--------
 csync/src/csync_statedb.h                  |   2 +-
 csync/src/csync_update.c                   |  73 +++++----
 csync/src/vio/csync_vio.c                  |  27 ++--
 csync/tests/ownCloud/ownCloud/Test.pm      |  13 +-
 csync/tests/ownCloud/t3.pl                 |  12 ++
 doc/building.rst                           |  53 ++-----
 src/CMakeLists.txt                         |   1 +
 src/creds/abstractcredentials.cpp          |  42 ++++++
 src/creds/abstractcredentials.h            |   3 +-
 src/creds/dummycredentials.cpp             |   6 -
 src/creds/dummycredentials.h               |   1 -
 src/creds/httpcredentials.cpp              |  34 -----
 src/creds/httpcredentials.h                |   2 -
 src/creds/shibboleth/shibbolethwebview.cpp |   3 +-
 src/creds/shibboleth/shibbolethwebview.h   |   4 +-
 src/creds/shibbolethcredentials.cpp        |  80 +++++++---
 src/creds/shibbolethcredentials.h          |   9 +-
 src/mirall/account.h                       |   2 +
 src/mirall/folderman.cpp                   |   6 +-
 src/mirall/mirallaccessmanager.cpp         |   7 +
 src/mirall/owncloudpropagator.cpp          |  59 +++++---
 src/mirall/owncloudpropagator_p.h          |   6 +-
 src/mirall/syncjournaldb.cpp               |  19 +++
 src/mirall/syncjournaldb.h                 |   1 +
 src/updater/ocupdater.cpp                  |  43 +-----
 src/updater/ocupdater.h                    |   2 -
 src/updater/updater.cpp                    |  57 ++++++-
 src/updater/updater.h                      |   8 +-
 src/wizard/owncloudshibbolethcredspage.cpp |   6 +-
 src/wizard/owncloudshibbolethcredspage.h   |   3 +-
 translations/mirall_ca.ts                  |  61 ++++----
 translations/mirall_cs.ts                  | 114 +++++++-------
 translations/mirall_de.ts                  |  69 ++++-----
 translations/mirall_el.ts                  | 146 +++++++++---------
 translations/mirall_en.ts                  |  61 ++++----
 translations/mirall_es.ts                  |  69 ++++-----
 translations/mirall_es_AR.ts               |  61 ++++----
 translations/mirall_et.ts                  |  77 +++++-----
 translations/mirall_eu.ts                  |  61 ++++----
 translations/mirall_fa.ts                  |  63 ++++----
 translations/mirall_fi.ts                  |  61 ++++----
 translations/mirall_fr.ts                  |  61 ++++----
 translations/mirall_gl.ts                  |  69 ++++-----
 translations/mirall_hu.ts                  |  61 ++++----
 translations/mirall_it.ts                  |  69 ++++-----
 translations/mirall_ja.ts                  |  69 ++++-----
 translations/mirall_nl.ts                  |  71 ++++-----
 translations/mirall_pl.ts                  |  79 +++++-----
 translations/mirall_pt.ts                  |  61 ++++----
 translations/mirall_pt_BR.ts               |  69 ++++-----
 translations/mirall_ru.ts                  |  74 +++++----
 translations/mirall_sk.ts                  |  61 ++++----
 translations/mirall_sl.ts                  |  77 +++++-----
 translations/mirall_sv.ts                  |  61 ++++----
 translations/mirall_th.ts                  |  61 ++++----
 translations/mirall_uk.ts                  |  61 ++++----
 translations/mirall_zh_CN.ts               | 113 +++++++-------
 translations/mirall_zh_TW.ts               |  61 ++++----
 translations/pofiles/tr.po                 |  69 ++++-----
 78 files changed, 1527 insertions(+), 1800 deletions(-)

diff --cc src/mirall/owncloudpropagator.cpp
index 8812396,ca40361..729f8f5
--- a/src/mirall/owncloudpropagator.cpp
+++ b/src/mirall/owncloudpropagator.cpp
@@@ -104,22 -100,39 +104,39 @@@ void PropagateItemJob::done(SyncFileIte
  }
  
  
- 
+ /**
+  * For delete or remove, check that we are not removing from a shared directory.
+  * If we are, try to restore the file
+  *
+  * Return true if the problem is handled.
+  */
 -bool PropagateItemJob::checkForProblemsWithShared()
 +bool PropagateNeonJob::checkForProblemsWithShared()
  {
      QString errorString = QString::fromUtf8(ne_get_error(_propagator->_session));
      int httpStatusCode = errorString.mid(0, errorString.indexOf(QChar(' '))).toInt();
  
      if( httpStatusCode == 403 && _propagator->isInSharedDirectory(_item._file )) {
-         // the file was removed locally from a read only Shared sync
-         // the file is gone locally and it should be recovered.
-         SyncFileItem downloadItem(_item);
-         downloadItem._instruction = CSYNC_INSTRUCTION_SYNC;
-         downloadItem._dir = SyncFileItem::Down;
-         _restoreJob.reset(new PropagateDownloadFile(_propagator, downloadItem));
+         if( _item._type != SyncFileItem::Directory ) {
+             // the file was removed locally from a read only Shared sync
+             // the file is gone locally and it should be recovered.
+             SyncFileItem downloadItem(_item);
+             downloadItem._instruction = CSYNC_INSTRUCTION_SYNC;
+             downloadItem._dir = SyncFileItem::Down;
+             _restoreJob.reset(new PropagateDownloadFile(_propagator, downloadItem));
+         } else {
+             // Directories are harder to recover.
+             // But just re-create the directory, next sync will be able to recover the files
+             SyncFileItem mkdirItem(_item);
+             mkdirItem._instruction = CSYNC_INSTRUCTION_SYNC;
+             mkdirItem._dir = SyncFileItem::Down;
+             _restoreJob.reset(new PropagateLocalMkdir(_propagator, mkdirItem));
+             // Also remove the inodes and fileid from the db so no further renames are tried for
+             // this item.
+             _propagator->_journal->avoidRenamesOnNextSync(_item._file);
+         }
          connect(_restoreJob.data(), SIGNAL(completed(SyncFileItem)),
                  this, SLOT(slotRestoreJobCompleted(SyncFileItem)));
 -        _restoreJob->start();
 +        QMetaObject::invokeMethod(_restoreJob.data(), "start");
          return true;
      }
      return false;
@@@ -480,7 -492,7 +498,7 @@@ static QString parseFileId(ne_request *
      return fileId;
  }
  
- void PropagateNeonJob::updateMTimeAndETag(const char* uri, time_t mtime)
 -bool PropagateItemJob::updateMTimeAndETag(const char* uri, time_t mtime)
++bool PropagateNeonJob::updateMTimeAndETag(const char* uri, time_t mtime)
  {
      QByteArray modtime = QByteArray::number(qlonglong(mtime));
      ne_propname pname;
diff --cc src/mirall/owncloudpropagator_p.h
index 6e5d531,649385c..9f35917
--- a/src/mirall/owncloudpropagator_p.h
+++ b/src/mirall/owncloudpropagator_p.h
@@@ -34,49 -34,6 +34,53 @@@ struct ScopedPointerHelpers 
  };
  
  
 +/*
 + * Abstract class for neon job.  Lives in the neon thread
 + */
 +class PropagateNeonJob : public PropagateItemJob {
 +    Q_OBJECT
 +protected:
 +
-     void updateMTimeAndETag(const char *uri, time_t);
++    /* Issue a PROPPATCH and PROPFIND to update the mtime, and fetch the etag
++     * Return true in case of success, and false if the PROPFIND failed and the
++     * error has been reported
++     */
++    bool updateMTimeAndETag(const char *uri, time_t);
 +
 +    /* fetch the error code and string from the session
 +       in case of error, calls done with the error and returns true.
 +
 +       If the HTTP error code is ignoreHTTPError,  the error is ignored
 +     */
 +    bool updateErrorFromSession(int neon_code = 0, ne_request *req = 0, int ignoreHTTPError = 0);
 +
 +    /*
 +     * to be called by the progress callback and will wait the amount of time needed.
 +     */
 +    void limitBandwidth(qint64 progress, qint64 limit);
 +
 +    bool checkForProblemsWithShared();
 +
 +    QElapsedTimer _lastTime;
 +    qint64        _lastProgress;
 +    int           _httpStatusCode;
 +
 +protected slots:
 +    void slotRestoreJobCompleted(const SyncFileItem& );
 +
 +private:
 +    QScopedPointer<PropagateItemJob> _restoreJob;
 +
 +public:
 +    PropagateNeonJob(OwncloudPropagator* propagator, const SyncFileItem &item)
 +        : PropagateItemJob(propagator, item), _lastProgress(0), _httpStatusCode(0) {
 +            moveToThread(propagator->_neonThread);
 +        }
 +
 +};
 +
 +
 +
  class PropagateLocalRemove : public PropagateItemJob {
      Q_OBJECT
  public:

-- 
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