Christian Kamm
b431f4ef0c
Discovery: Fix log output for instructions
2020-12-15 10:58:13 +01:00
Christian Kamm
ce420d77a8
Discovery: Don't rebuild invalidFilname regex each call
2020-12-15 10:58:13 +01:00
Christian Kamm
113124cde5
Discovery: Introduce smaller functions
2020-12-15 10:58:13 +01:00
Christian Kamm
4f6f706f40
Excludes: drop csyncTraversalMatchFun()
...
The new discovery can call the traversal match function directly.
2020-12-15 10:58:13 +01:00
Christian Kamm
d1aedcfd3c
Discovery: restructure processFileAnalyzeLocalInfo
2020-12-15 10:58:10 +01:00
Christian Kamm
a2839bd40a
Discovery: easy conditions first in processFileAnalyzeRemoteInfo
...
Removing two levels of indent that way
2020-12-15 10:58:10 +01:00
Christian Kamm
76341904e9
Discovery: Add comments
2020-12-15 10:58:10 +01:00
Olivier Goffart
5a1c93d0ac
Discovery: make sure finished is not called twice, even in case of errors
2020-12-15 10:58:10 +01:00
Olivier Goffart
f666511a4b
Discovery: Remove stale DB entries
...
And test the Remove/Remove case.
This means we need to always query the database for all the entries.
This showed another small bug in the test in which sync item for virtual
files at the root could have a slash in front of them.
2020-12-15 10:58:10 +01:00
Olivier Goffart
aa18e10ff5
Discovery: cleanups and comments
2020-12-15 10:58:09 +01:00
Olivier Goffart
b10b3e5eeb
Discovery: move checkMovePermissions to its own function
2020-12-15 10:58:09 +01:00
Olivier Goffart
edd866b32b
Discovery: Adjust the instruction in case of resolved conflict
...
When resolving a conflict because the file was just updated on the server,
we write all the metadata on the database immediatly, so INSTRUCITON_NONE
is enough and UPDATE_METADATA is not needed
2020-12-15 10:58:09 +01:00
Olivier Goffart
7cddaf82ab
ProcessDirectoryJob: always set _childModified to true, regardless the direction
...
This was like that to handle the case of CSYNC_INSTRUCTION_TYPE_CHANGE, but just add
a condition in this location.
2020-12-15 10:58:09 +01:00
Olivier Goffart
46510c2f39
Discovery phase: refactor some code in DiscoveryPhase::findAndCancelDeletedJob
...
Less code duplication
2020-12-15 10:58:09 +01:00
Olivier Goffart
1c2a3279bb
New Discovery Algorithm: more cleanups
...
- rename progress() to be more explicit
- Make some more member of the discovery phase private
2020-12-15 10:58:09 +01:00
Olivier Goffart
afed46afcc
New discovery algorithm: Parallel PROPFIND
2020-12-15 10:58:08 +01:00
Olivier Goffart
35c0cf4e59
New discovery algorithm: Set the originalFile for ignored files
...
This is used to show the name in the UI
2020-12-15 10:58:08 +01:00
Olivier Goffart
52dcfcb166
New Propagation algorithm: Fetch, and emit, the root etag
...
Remove the feature to concatenate etags as servers that don't
have a root etag are no longer suported
2020-12-15 10:58:07 +01:00
Olivier Goffart
d25d87e92c
New Discovery Algorithm: Ge tthe size of new folders
...
Also add a test that this works properly
2020-12-15 10:58:07 +01:00
Olivier Goffart
ef542ac83d
New Discovery algorithm: Split the process function even further
...
Move the finialization in its own function.
This allow to save a bit of code duplication.
Also change the order of the parameter in the constructor for consistency
2020-12-15 10:58:07 +01:00
Olivier Goffart
fc69dda246
New Discovery Algo: Refactor by splitting the processFile in two
2020-12-15 10:58:07 +01:00
Olivier Goffart
b7d827d6d0
New Discovery Algorithm: Handle rename of virtual files
2020-12-15 10:58:07 +01:00
Olivier Goffart
21fe54fb13
New Discovery Algo: readability improvements
...
As proposed by ckamm on #6738
2020-12-15 10:58:04 +01:00
Olivier Goffart
3a06a7978f
New discovery algo: data finger print
2020-12-15 10:58:04 +01:00
Olivier Goffart
5683f1c33d
New Disco Algo: Handle spurious virtual files
...
Port commit 0b9049e6ff
for issue #6718
2020-12-15 10:58:04 +01:00
Olivier Goffart
a36ed56f01
New Discovery algorithm: Refactor a bit the way the signal are emited
2020-12-15 10:58:02 +01:00
Olivier Goffart
b6487181c6
New Discovery Phase: fix a few FIXME
...
Some FIXME were already fixed.
2020-12-15 10:58:02 +01:00
Olivier Goffart
9863500ec1
New discovery algorithm: handle symlinks
2020-12-15 10:58:01 +01:00
Olivier Goffart
a9ec521bf1
New discovery algo: Handle Database error
2020-12-15 10:58:01 +01:00
Olivier Goffart
1bcbcd407c
New discovery phase: read the direct download URL and Cookie
2020-12-15 10:58:01 +01:00
Olivier Goffart
ac24cdbde6
New Discovery Algo: Permsission check
2020-12-15 10:58:01 +01:00
Olivier Goffart
57068b0fd9
New Discovery Algorithm: handle server errors
2020-12-15 10:58:00 +01:00
Olivier Goffart
4031fb6d5b
Backport 64014dd374
2020-12-15 10:58:00 +01:00
Olivier Goffart
f4a5167812
New Discovery Algo: Support the DatabaseAndFilesystem mode for local discovery
2020-12-15 10:57:59 +01:00
Olivier Goffart
370923791d
New Disco algortihm: Fix TestChunkingNG::connectionDroppedBeforeEtagRecieved
...
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-12-15 10:57:59 +01:00
Olivier Goffart
f926248937
New discovery algorithm: More work on virtual files
2020-12-15 10:57:59 +01:00
Olivier Goffart
35e40b58ca
New Disco algorithm: Type change (file to dir)
2020-12-15 10:57:59 +01:00
Olivier Goffart
1e8c37d3d6
New discovery algorithm: Virtual files
...
The commented tests lines were implementation details
2020-12-15 10:57:59 +01:00
Olivier Goffart
d54e00488a
New Discovery algorithm
...
Some error handling. In particular for the case where there is a conflict
between files and directories.
SyncEngineTest and SyncMoveTest passes
2020-12-15 10:57:58 +01:00
Olivier Goffart
a384a2d1cb
New Discovery algorithm: Handle of move within a moved directory
2020-12-15 10:57:58 +01:00
Olivier Goffart
bdd1e72dda
New discovery algoritmh: more on Renames
2020-12-15 10:57:58 +01:00
Olivier Goffart
f43d07dc05
New Discovery algorithm: Check that the original file is still on the server while renaming
2020-12-15 10:57:58 +01:00
Olivier Goffart
7e36cc3fcb
New disco algorithm: Fix some moving
...
Fix TestSyncMove::testSelectiveSyncMovedFolder
2020-12-15 10:57:58 +01:00
Olivier Goffart
5a57a36729
New discovery algorithm: Local rename
2020-12-15 10:57:58 +01:00
Olivier Goffart
f9a9be59e6
New discovery algo: Remote move
...
TestSyncMove::testRemoteChangeInMovedFolder
2020-12-15 10:57:57 +01:00
Olivier Goffart
92ddc60900
Handle Encoding Problems
...
TestSyncEngine now passes
2020-12-15 10:57:57 +01:00
Olivier Goffart
501da58b10
Ignore Hidden Files
2020-12-15 10:57:57 +01:00
Olivier Goffart
8bf69cf0cd
Port the invalid napme regexp
...
TestSyncEngine::testInvalidFilenameRegex
2020-12-15 10:57:57 +01:00
Olivier Goffart
9efd21d70b
More progress
...
TestSyncEngine::testFakeConflict / TestSyncEngine::testSyncFileItemProperties
2020-12-15 10:57:57 +01:00
Olivier Goffart
e934f6b27b
New discovery algo
...
Make TestSyncEngine::testSelectiveSyncBug pass
2020-12-15 10:57:57 +01:00
Olivier Goffart
4066c1a004
New discovery: TestSyncEngine::testEmlLocalChecksum
2020-12-15 10:57:57 +01:00
Olivier Goffart
9bf417d930
New discovery algorithm
...
Some progress:
TestSyncEngine::testDirUpload
2020-12-15 10:57:56 +01:00
Olivier Goffart
ec681ab2a5
New discovery algorithm: Initial work.
...
SyncEngineTest testFileDownload is passing
2020-12-15 10:57:56 +01:00