Simon Frei and Jakob Borg
d4e81fff8a
lib/model: Remove unnecessary arguments in pulling functions ( #5619 )
2019-03-25 12:59:22 +01:00
Simon Frei and Jakob Borg
bc53782f88
test: Update conflict integration test (ref #5511 ) ( #5618 )
...
The change in 225c0dda80 (#5511 ) results in
conflicts being immediately scanned and synced, while the test expects just one
conflict on either side. Change it to expect the same conflict on both sides.
2019-03-25 12:53:06 +01:00
Simon Frei and Jakob Borg
e4ab9d3312
lib/model: Pass correct file info to deleteItemOnDisk ( fixes #5616 ) ( #5617 )
2019-03-25 12:43:21 +01:00
Simon Frei and Jakob Borg
e31a116e6e
lib/model: Pass correct file info to deleteItemOnDisk ( fixes #5616 ) ( #5617 )
2019-03-25 12:42:39 +01:00
Simon Frei and Audrius Butkevicius
675f289aef
gui: Add new folder state "Failed Items" ( fixes #5456 ) ( #5614 )
2019-03-22 17:57:53 +00:00
Simon Frei and Jakob Borg
e7ae851900
lib/model: Debug and test fixes ( #5613 )
2019-03-22 14:43:47 +01:00
Simon Frei and Audrius Butkevicius
1a6d023ba8
lib/model: Run recvonly tests in temporary dirs ( #5587 )
2019-03-20 17:38:03 +00:00
Simon Frei and Audrius Butkevicius
50d8c43e7c
lib/config: Set UseLargeBlocks to true by default ( fixes #5599 ) ( #5600 )
2019-03-12 12:59:26 +00:00
Simon Frei and Audrius Butkevicius
289a02e994
lib/model: Integrate stat refs in folder ( #5596 )
2019-03-11 16:57:21 +00:00
Simon Frei and Jakob Borg
445637ebec
lib/model: Pass fset & ignores on folder creation ( #5592 )
2019-03-11 07:28:54 +01:00
Simon Frei and GitHub
3f3d2c814b
lib/model: Remove unused code ( #5591 )
2019-03-10 17:05:39 +01:00
Simon Frei and Audrius Butkevicius
189e44488e
lib/model: Introduce must test utility ( #5586 )
...
* lib/model: Introduce must test utility
* nice
2019-03-09 18:45:36 +00:00
Simon Frei and Audrius Butkevicius
27ff20faa3
lib/model: Introduce waitForState test utility ( #5585 )
...
* lib/model: Introduce waitForState test utility
* folder id as param to waitForState
2019-03-09 10:36:55 +00:00
Simon Frei and Audrius Butkevicius
b1564e53e4
lib/model: Improve test utilities ( #5584 )
2019-03-08 20:29:09 +00:00
Simon Frei and GitHub
3a75b63776
lib/model: Use temp dir from osutils in tests ( #5581 )
2019-03-07 16:34:41 +01:00
Simon Frei and GitHub
8e238c8e48
lib/model: Check before replacing existing file on pull ( fixes #5571 ) ( #5567 )
2019-03-07 15:15:14 +01:00
Simon Frei and Jakob Borg
bd37f6da17
lib/model: Optimize dbUpdaterRoutine ( #5576 )
2019-03-05 21:32:37 +01:00
Simon Frei and Audrius Butkevicius
6940d79f5b
lib/model: Use errors.Wrap for pull errors ( #5563 )
2019-03-04 13:01:52 +00:00
Simon Frei and GitHub
0f80318ef6
lib/scanner: Consistenlty use CreateFileInfo and remove outdated comment ( #5574 )
2019-03-04 13:27:33 +01:00
Simon Frei and Audrius Butkevicius
d6622b1f68
lib/model: setUp -> setup ( #5573 )
2019-03-04 12:27:10 +00:00
Simon Frei and Audrius Butkevicius
43bcb3d5a5
lib/model: Refactor conflict name handling ( #5572 )
2019-03-04 12:20:40 +00:00
Simon Frei and Audrius Butkevicius
722b3fce6a
all: Hide implementations behind interfaces for mocked testing ( #5548 )
...
* lib/model: Hide implementations behind interfaces for mocked testing
* review
2019-02-26 08:09:25 +00:00
Simon Frei and GitHub
ad5a046843
lib/fs: Rename fsFile* to basicFile* ( #5546 )
2019-02-24 18:02:02 +01:00
Simon Frei and Audrius Butkevicius
ca3ae64bbf
lib/db: Flush batch based on size and refactor ( fixes #5531 ) ( #5536 )
...
Flush the batch when exceeding a certain size, instead of when reaching a number
of batched operations.
Move batch to lowlevel to be able to use it in NamespacedKV.
Increase the leveldb memory buffer from 4 to 16 MiB.
2019-02-14 23:15:13 +00:00
Simon Frei and Audrius Butkevicius
e2204d0071
build: Add option to get test coverage ( #5539 )
2019-02-14 22:38:47 +00:00
Simon Frei and Audrius Butkevicius
d5ff2c41dc
all: Get rid of fatal logging ( #5537 )
...
* cleanup Fatal in lib/config/config.go
* cleanup Fatal in lib/config/folderconfiguration.go
* cleanup Fatal in lib/model/model.go
* cleanup Fatal in cmd/syncthing/monitor.go
* cleanup Fatal in cmd/syncthing/main.go
* cleanup Fatal in lib/api
* remove Fatal methods from logger
* lowercase in errors.Wrap
* one less channel
2019-02-14 20:29:14 +00:00
Simon Frei and Audrius Butkevicius
7a40c42e8b
cmd/syncthing: Introduce exiter to handle termination ( #5532 )
2019-02-13 23:07:27 +00:00
Simon Frei and Audrius Butkevicius
905c3594b0
lib/model: Various model test fixes and polish ( #5528 )
...
* lib/model: Various model test fixes and polish
Missing calls to m.Stop()
Don't fail test if temporary test dir cleanup fails
* drop lazyness
2019-02-13 18:54:04 +00:00
Simon Frei and Jakob Borg
225c0dda80
lib/model: Scan conflicts after creation ( #5511 )
...
Also unflakes and improve TestRequestRemoteRenameChanged.
2019-02-12 16:05:20 +01:00
Simon Frei and Jakob Borg
5fd2cab102
lib/model: Run more tests in tmp dir ( #5527 )
2019-02-12 16:04:04 +01:00
Simon Frei and Audrius Butkevicius
4299af1c63
lib/config, lib/model: Use path from locations to check disk space for db ( #5525 )
2019-02-12 12:25:11 +00:00
Simon Frei and Audrius Butkevicius
d85ef949be
lib/model: Introduce setupModel test utility ( #5524 )
2019-02-12 12:18:13 +00:00
Simon Frei and Jakob Borg
7bac927ac8
lib/model: Use functions to generate config ( #5513 )
2019-02-12 07:50:07 +01:00
Simon Frei and Jakob Borg
2f415d8f09
lib/model: Don't use LocalDeviceID as normal id in tests ( #5512 )
2019-02-06 09:32:03 +01:00
Simon Frei and Audrius Butkevicius
e538797ce1
lib/model: Improve TestIssue5063 ( #5509 )
...
* lib/model: Improve TestIssue5063
* add not that helpful issue comment
2019-02-05 23:07:21 +00:00
Simon Frei and Audrius Butkevicius
5df8219bcb
lib/model: Add progressEmitter to supervisor (model) ( #5510 )
2019-02-05 18:02:36 +00:00
Simon Frei and Audrius Butkevicius
af4fb97538
lib/model: Fail test instead of panic due to closing channel twice ( #5508 )
2019-02-05 18:01:56 +00:00
Simon Frei and Audrius Butkevicius
5d9d87f770
lib/model: Helperize test os and remove error return value ( #5507 )
2019-02-05 18:01:05 +00:00
Simon Frei and Jakob Borg
41d037da1f
build: Remove outdated&non-functional setup command ( fixes #5454 ) ( #5455 )
2019-02-02 12:47:46 +01:00
Simon Frei and Jakob Borg
82afe73a9a
cmd/syncthing, lib/config: Update default config creation ( #5492 )
...
Also remove dead code in config.Wrapper.
2019-02-02 12:43:57 +01:00
Simon Frei and Jakob Borg
583172dc8d
lib/db: Fix race in NamespacedKV ( #5496 )
2019-02-01 09:54:21 +01:00
Simon Frei and Jakob Borg
5605877625
cmd/syncthing: Pass SIGTERM on in monitor ( fixes #5493 ) ( #5494 )
2019-01-31 18:35:20 +01:00
Simon Frei and GitHub
7236d56731
lib/model: In tests disable watching for changes by default ( fixes #5246 ) ( #5485 )
2019-01-30 16:38:10 +01:00
Simon Frei and Jakob Borg
657be162dd
test, lib/rc: Integration test fixes and polish ( #5488 )
2019-01-29 16:59:00 +01:00
Simon Frei and Jakob Borg
8815ef922b
mod: Update dependencies and tidy ( fixes #5311 ) ( #5486 )
2019-01-28 22:45:56 +01:00
Simon Frei and Jakob Borg
79d109a386
lib/config: Add omitempty to DeprecatedMinHomeDiskFreePct ( fixes #5482 ) ( #5484 )
2019-01-28 11:46:28 +01:00
Simon Frei and Jakob Borg
a45ba70467
lib/model: Improve errors while pulling ( #5474 )
2019-01-24 08:18:55 +01:00
Simon Frei and Jakob Borg
42bd42df5a
lib/db: Do all update operations on a single item at once ( #5441 )
...
To do so the BlockMap struct has been removed. It behaves like any other prefixed
part of the database, but was not integrated in the recent keyer refactor. Now
the database is only flushed when files are in a consistent state.
2019-01-23 10:22:33 +01:00
Simon Frei and Jakob Borg
a371b15398
lib/db: Various polish ( #5471 )
...
naming: buf -> keyBuf
dedup: use getFileTrunc
manually inline insertFile
2019-01-20 10:24:39 +01:00
Simon Frei and Jakob Borg
00fa77dd47
lib/db: Consistent use of buffers ( #5470 )
2019-01-20 08:47:20 +01:00
Simon Frei and Jakob Borg
df4d754197
lib/db: Minor polish ( #5469 )
2019-01-19 20:26:46 +01:00
Simon Frei and Jakob Borg
f3d735c56a
lib/db: Fix, optimize and extend benchmarks ( #5467 )
2019-01-19 20:24:44 +01:00
Simon Frei and Jakob Borg
1d99db9bc6
lib/db: Deduplicate getFile* code ( #5468 )
2019-01-19 20:21:58 +01:00
Simon Frei and Audrius Butkevicius
22e133cce6
lib/db: Deduplicate comparing old and new items ( #5465 )
2019-01-18 21:19:56 +00:00
Simon Frei and Jakob Borg
1f87b874af
lib/db: Add "dirty" function terminology to getGlobal (ref #5462 ) ( #5463 )
2019-01-18 13:01:39 +01:00
Simon Frei and Jakob Borg
c87411851d
lib/protocol: Fix potential deadlock when closing connection (ref #5440 ) ( #5442 )
2019-01-14 08:32:37 +01:00
Simon Frei and Jakob Borg
51f65bd23a
lib/model: Reset pull errors when succeeding ( fix #5450 ) ( #5451 )
2019-01-14 08:30:52 +01:00
Simon Frei and Audrius Butkevicius
0b03b6a9ec
lib/model: Improve filesystem operations during tests ( fixes #5422 )
...
* lib/fs, lib/model: Improve filesystem operations during tests (fixes #5422 )
Introduces MustFilesystem that panics on errors and should be used for operations
during testing which must never fail.
Create temporary directories outside of testdata.
* don't do a filesystem, just a wrapper around os for testing
* fix copyright
2019-01-11 12:56:05 +00:00
Simon Frei and Jakob Borg
24ffd8be99
all: Send Close BEP msg on intentional disconnect ( #5440 )
...
This avoids waiting until next ping and timeout until the connection is actually
closed both by notifying the peer of the disconnect and by immediately closing
the local end of the connection after that. As a nice side effect, info level
logging about dropped connections now have the actual reason in it, not a generic
timeout error which looks like a real problem with the connection.
2019-01-09 17:31:09 +01:00
Simon Frei and Jakob Borg
158559023e
lib/db: Fix sequence updating for remote invalid items ( #5420 )
...
* lib/db: Fix sequence updating for remote invalid items
* fix for the unit test introduced in the previous commit
* lib/db: Polish blockmap
2019-01-04 20:19:10 +01:00
Simon Frei and Jakob Borg
47e08797cb
lib/model: Don't pull if ignores failed to load and cleanup ( #5418 )
2019-01-01 10:17:14 +01:00
Simon Frei and Jakob Borg
643cfe2e98
lib/config: Revert #5415 ( #5417 )
...
This reverts commit 9d075781ad :
"cmd/syncthing: Improve messages when free space is running out (#5415 )"
2018-12-30 21:57:41 +01:00
Simon Frei and Jakob Borg
8bb9878f26
lib/model: Check folder context before setting error state ( #5416 )
2018-12-30 21:56:16 +01:00
Simon Frei and Jakob Borg
4783294a09
lib/model: Don't pass nil *Matcher to performFinish ( fixes #5401 ) ( #5402 )
2018-12-22 21:58:17 +01:00
Simon Frei and Jakob Borg
99c9d65ddf
lib/scanner: Check ignore patterns before reporting error ( fixes #5397 ) ( #5398 )
2018-12-21 12:08:15 +01:00
Simon Frei and Jakob Borg
fc81e2b3d7
lib/model: Do folder watch operations under lock ( fixes #5392 ) ( #5395 )
2018-12-21 12:06:21 +01:00
Simon Frei and Jakob Borg
c3b3e02f21
test: Update configs and revert changes during testing ( #5393 )
2018-12-21 11:50:28 +01:00
Simon Frei and Jakob Borg
2626143fc5
lib/rc: Fix hangups when Syncthing process ends unexpectedly ( #5383 )
2018-12-21 11:49:04 +01:00
Simon Frei and Jakob Borg
3cc8918eb4
lib/db: Defer unlock to avoid hangup on panic ( #5388 )
2018-12-17 14:59:09 +01:00
Simon Frei and GitHub
c40c9a8d6a
lib/scanner: Don't report error on missing items ( fixes #5385 ) ( #5387 )
2018-12-17 14:52:15 +01:00
Simon Frei and Jakob Borg
c934918347
lib/scanner: Fix empty path on normalization error ( fixes #5369 ) ( #5370 )
2018-12-12 12:09:39 +01:00
Simon Frei and Jakob Borg
a09079ed25
all: Display list of locally changed items in UI ( fixes #5336 ) ( #5337 )
2018-12-11 09:59:04 +01:00
Simon Frei and GitHub
0391c57a37
cmd/syncthing: Improve logged device information on startup ( #5321 )
2018-11-22 11:39:01 +01:00
Simon Frei and Jakob Borg
2f9840ddae
lib: Introduce fs.IsParent ( fixes #5324 ) ( #5326 )
2018-11-22 11:16:45 +01:00
Simon Frei and Audrius Butkevicius
db8777c29e
lib/model: Add test for #5323 ( #5325 )
2018-11-13 08:36:16 +00:00
Simon Frei and Jakob Borg
33bed5b1ec
lib/model: Don't compare permissions if IgnorePerms is true ( fixes #5323 ) ( #5322 )
2018-11-13 08:54:49 +01:00
Simon Frei and Jakob Borg
4f27bdfc27
lib/model, lib/protocol: Handle request concurrency in model ( #5216 )
2018-11-13 08:53:55 +01:00
Simon Frei and Jakob Borg
603da2dce2
cmd/syncthing, lib/relay: Fixes regarding stopping of services ( #5293 )
2018-11-07 11:05:07 +01:00
Simon Frei and Jakob Borg
d510e3cca3
all: Display errors while scanning in web UI ( fixes #4480 ) ( #5215 )
2018-11-07 11:04:41 +01:00
Simon Frei and Jakob Borg
aec91d8f32
cmd/ursrv: Add google maps api key ( fixes #5296 ) ( #5303 )
2018-11-01 06:21:28 +01:00
Simon Frei and Jakob Borg
53b0f36be6
lib/fs: Use os.FileMode.String for fs.FileMode ( #5302 )
2018-10-31 12:49:50 +01:00
Simon Frei and Jakob Borg
01ade9c8ae
lib/connections: Don't panic on removed device ( fixes #5299 ) ( #5300 )
2018-10-30 10:34:19 +01:00
Simon Frei and Jakob Borg
b1acc37c16
lib/db: Update local need on device removal ( fixes #5294 ) ( #5295 )
2018-10-30 05:40:51 +01:00
Simon Frei and Audrius Butkevicius
64a591610b
lib/model: Check if files from queue are invalid ( fixes #5291 ) ( #5292 )
2018-10-26 19:13:35 +01:00
Simon Frei and GitHub
406bedf1e3
lib/logger: Disable debug flags without debugging ( fixes #4780 ) ( #5278 )
2018-10-23 15:17:40 +02:00
Simon Frei and Jakob Borg
7f55fbbe84
gui: Show usage reporting title regardless of RC ( #5284 )
2018-10-23 17:30:13 +09:00
Simon Frei and GitHub
c0be9987d0
build: Add desktop files and icons to .deb ( fixes #3439 ) ( #5277 )
2018-10-20 08:25:59 +02:00
Simon Frei and Jakob Borg
6325ae070c
cmd/syncthing: Correct type assertion in verboseService ( fixes #5270 ) ( #5272 )
2018-10-16 01:09:24 +02:00
Simon Frei and Audrius Butkevicius
089c283ca6
lib/config: Disable folder free disk check when configured ( fixes #5267 ) ( #5268 )
2018-10-12 12:34:56 +01:00
Simon Frei and Jakob Borg
8d7ea0424d
vendor: Update github.com/syncthing/notify ( #5263 )
2018-10-12 12:24:25 +02:00
Simon Frei and Jakob Borg
0690fe7585
lib/model: Unnecessary return ( #5264 )
2018-10-11 15:08:37 +02:00
Simon Frei and Jakob Borg
3e50edf46f
lib/db: More info in sequence panic msg ( #5261 )
2018-10-11 12:05:57 +02:00
Simon Frei and Jakob Borg
1b10607def
lib/model: Don't check folder health if there is nothing to pull ( fixes #2497 ) ( #5255 )
2018-10-11 11:33:21 +02:00
Simon Frei and Jakob Borg
d10773c311
lib/db, lib/model: Resolve identical recv only items ( fixes #5130 ) ( #5230 )
2018-10-10 12:43:07 +02:00
Simon Frei and Jakob Borg
523ac45456
lib/model: Treat failed rename like del&update ( #5203 )
2018-10-10 11:37:20 +02:00
Simon Frei and Jakob Borg
c9d6366d75
lib/connections: Don't info log about LAN if there are no rate limits ( #5242 )
2018-10-05 08:22:47 +02:00
Simon Frei and Jakob Borg
714a47ffb0
lib/config: Add context to the home disk out of space error ( #5241 )
2018-10-05 08:21:39 +02:00
Simon Frei and Jakob Borg
c2b0d309fb
lib/model: Prevent repeat db update ( #5231 )
2018-09-27 07:41:40 +02:00
Simon Frei and GitHub
cb0950b3fd
lib/db: Improve VersionList.String ( #5229 )
2018-09-26 23:30:22 +02:00
Simon Frei and Audrius Butkevicius
03d0f0dc34
lib/fs: Try EvalSymlinks without '\\?\' prefix on failure ( fixes #5226 ) ( #5227 )
2018-09-26 19:28:20 +01:00