Commit Graph

2340 Commits

Author SHA1 Message Date
Marian Beermann 0e3bba7b64 Don't rebuild command line parser for each invocation
Makes tests faster
2016-05-25 22:01:38 +02:00
enkore 4302ffbdbc Merge pull request #1092 from ThomasWaldmann/fix-stdout
fix crashing borg extract --stdout, fixes #1064
2016-05-24 23:11:03 +02:00
TW 4c4aa64410 Merge pull request #1091 from ThomasWaldmann/swidth-fallback
fall back to len() if wcswidth returns negative value
2016-05-24 22:56:59 +02:00
Thomas Waldmann 9fff2af134 fix crashing borg extract --stdout, fixes #1064 2016-05-24 22:40:20 +02:00
Thomas Waldmann c4c11d75a1 fall back to len() if wcswidth returns neg. value, fixes #1090 2016-05-24 22:18:14 +02:00
enkore e134f652ce Merge pull request #1089 from enkore/fix/tox-yes-again
fix tox build for environment-python != containing-python in yet-anot…
2016-05-24 21:41:28 +02:00
Marian Beermann 4f1157c3a4
fix tox build for environment-python != containing-python in yet-another instance
this instance: the repository worktree is *not* named borg.
2016-05-24 20:58:12 +02:00
enkore 684efd08ff Merge pull request #1075 from enkore/fix/commitcheck-2
Repository: avoid reading large segments for commit state check
2016-05-24 18:52:50 +02:00
enkore 33f3a70cf6 Merge pull request #1077 from ThomasWaldmann/do-not-chunk-small-files
chunker: speed up remainder <= min_size case
2016-05-24 18:44:44 +02:00
Marian Beermann 7a569bc037
Repository: avoid reading large segments for commit state check 2016-05-23 00:42:37 +02:00
enkore 5fa52758a0 Merge pull request #1084 from enkore/fix/plsf
Fix referencing error in platform_linux.set_flags
2016-05-22 20:06:40 +02:00
Marian Beermann cdb8cc5490
Fix referencing error in platform_linux.set_flags 2016-05-22 19:54:10 +02:00
enkore ec90f9ae57 Merge pull request #1083 from enkore/fix/ppc
Fix bug on powerpc linux
2016-05-22 19:31:36 +02:00
Marian Beermann f27f0e1ea2
Fix bug on powerpc linux 2016-05-22 19:15:47 +02:00
enkore 279fb3958f Merge pull request #1082 from enkore/issue/1080
List files excluded via UF_NODUMP
2016-05-22 18:15:22 +02:00
Marian Beermann ed6f6b9aac
platform_linux.set_flags: don't raise on EOPNOTSUPP 2016-05-22 17:38:53 +02:00
Marian Beermann ffa78161cd
List files excluded via UF_NODUMP 2016-05-22 15:50:34 +02:00
TW 5675e4fceb Merge pull request #1073 from ThomasWaldmann/test-py36
test on py36
2016-05-22 13:38:47 +02:00
TW a1365c9bc7 Merge pull request #1079 from enkore/issue/1078
Fix crash regression for UDS introduced in 805f631
2016-05-22 13:38:22 +02:00
Marian Beermann e7523b7d46
Fix fuse tests when flags are available
e.g. fuse installed, TMPDIR != tmpfs
2016-05-22 11:29:57 +02:00
Marian Beermann ce6b838da8 Fix crash regression for UDS introduced in 805f631 2016-05-22 11:09:07 +02:00
Thomas Waldmann 96a798debb chunker: add a comment about a potential speedup 2016-05-22 01:22:52 +02:00
Thomas Waldmann 8834f6fdbd chunker: do not buzhash if not needed, fixes #1021
For small remainders of files (last chunk), we do not need to buzhash if it
is already clear that there is not enough left (we want at least min_size big
chunks).

Small files are handled by same code - as they only give 1 chunk, that is
the last chunk (see above).

See "Cases" considerations below.

For big files, we do not need to buzhash the first min_size bytes of a chunk -
we do not want to cut there anyway, so we can start buzhashing at offset
min_size.

Cases (before this change)
--------------------------

- A) remaining <= window_size

  - would do 2 chunker_fill calls (both line 253) and trigger eof with the 2nd call
  - no buzhashing
  - result is 1 <remaining> length chunk

- B) window_size < remaining <= min_size:

  - the chunker would do 1 chunker_fill call (line 253) that would read the entire remaining file (but not trigger eof yet)
  - would compute all possible remaining - window_size + 1 buzhashes, but without a chance for a cut,
    because there is also the n < min_size condition
  - would do another chunker_fill call (line 282), but not get more data, so loop ends
  - result is 1 <remaining> length chunk

- C) file > min_size:

  - normal chunking

Cases (after this change)
-------------------------

- A) similar to above A), but up to remaining < min_size + window_size + 1,
  so it does not buzhash if there is no chance for a cut.

- B) see C) above
2016-05-22 01:18:16 +02:00
TW 166352ee25 Merge pull request #1076 from ThomasWaldmann/docs-chunker-kernel-version
clarify comment about linux kernel versions, fixes #1024
2016-05-21 21:17:13 +02:00
Thomas Waldmann 99fa484726 clarify comment about linux kernel versions
currently, ALL linux kernels are affected.
2016-05-21 21:08:03 +02:00
Thomas Waldmann d27a3521ec test on py36 2016-05-21 19:24:18 +02:00
enkore 1a0277021c Merge pull request #981 from ThomasWaldmann/items-refactor
Items refactoring
2016-05-21 10:16:19 +02:00
Thomas Waldmann e6cf4ee627 disallow setting unknown attributes, use StableDict as .as_dict() result 2016-05-21 03:35:07 +02:00
Thomas Waldmann 46362a1962 add more tests 2016-05-21 03:35:07 +02:00
Thomas Waldmann e81407ff81 add bigint coding, allow None as user/group 2016-05-21 03:35:07 +02:00
Thomas Waldmann c18209fc90 split into generic PropDict and special Item class 2016-05-21 03:35:07 +02:00
Thomas Waldmann c6f5989905 Item implementation + tests 2016-05-21 03:35:07 +02:00
Thomas Waldmann b8303a38bf Merge branch '1.0-maint' 2016-05-20 22:48:57 +02:00
Thomas Waldmann 21a30269c2 freebsd: use a older llfuse release that builds
llfuse >0.41.1 <=1.0.0 does not build on freebsd.
the issue is already fixed, but no new release yet.
2016-05-20 21:50:26 +02:00
Thomas Waldmann 5be71b506e update CHANGES 2016-05-20 21:49:01 +02:00
TW 956f76c690 Merge pull request #865 from edgewood/master
Print --list output (only) without requiring --info
2016-05-20 15:13:53 +02:00
Thomas Waldmann 8d8374d23c ran build_api + build_usage 2016-05-20 14:34:48 +02:00
TW 938628f4e1 Merge pull request #1062 from ThomasWaldmann/update-1.0-docs
update CHANGES
2016-05-20 14:06:27 +02:00
Thomas Waldmann 1e061a2fa4 update CHANGES 2016-05-20 14:05:05 +02:00
TW f974770db5 Merge pull request #1066 from enkore/issue/1063
RepositoryCache: don't cache large objects
2016-05-20 13:55:12 +02:00
Marian Beermann f7f95ae731
RepositoryCache: don't cache large objects
avoids excessive cache repository disk usage
2016-05-20 02:01:17 +02:00
enkore d043794757 Merge pull request #1052 from enkore/fix/commitcheck
Repository: fix commit tags being seen in data
2016-05-19 17:12:52 +02:00
Marian Beermann 714e93bf64
Repository: fix commit tags being seen in data 2016-05-19 01:12:06 +02:00
enkore 13a4e40024 Merge pull request #1053 from ThomasWaldmann/wcswidth
add swidth call, fixes #1051
2016-05-19 00:29:14 +02:00
Thomas Waldmann a8e457f935 move Statistics class to archive module, avoid cyclic import
also move the tests accordingly.
2016-05-18 23:59:47 +02:00
Ed Blackman 226e5519f3 Print implied output without --info/-v
There are persistent questions why output from options like --list
and --stats doesn't show up.  Also, borg currently isn't able to
show *just* the output for a given option (--list, --stats,
--show-rc, --show-version, or --progress), without other INFO level
messages.

The solution is to use more granular loggers, so that messages
specific to a given option goes to a logger designated for that
option.  That option-specific logger can then be configured
separately from the regular loggers.

Those option-specific loggers can also be used as a hook in a
BORG_LOGGING_CONF config file to log the --list output to a separate
file, or send --stats output to a network socket where some daemon
could analyze it.

Steps:
- create an option-specific logger for each of the implied output options
- modify the messages specific to each option to go to the correct logger
- if an implied output option is passed, change the option-specific
  logger (only) to log at INFO level
- test that root logger messages don't come through option-specific loggers

They shouldn't, per https://docs.python.org/3/howto/logging.html#logging-flow
but test just the same.  Particularly test a message that can come from
remote repositories.

Fixes #526, #573, #665, #824
2016-05-18 14:58:44 -04:00
Ed Blackman afb9dc9d7a Update logging parser to allow remotes to pass logger name
Parser now understands both old format messages (to keep talking to
old server) and new format messages that pass a logger name.  If
logger name is passed, the message is directed to the same logger
locally.

This could be cherry-picked to 1.x-maint (and 0.x-maint?) to allow
point releases to understand borg 1.1 server messages changed in the
next commit.  Worst case, currently existing 0.x and 1.0.x clients
talking to a 1.1.x server will see messages like:
	borg.repository Remote: hi
	borg.archiver Remote: foo
instead of
	Remote: hi
	Remote: foo
2016-05-18 14:58:43 -04:00
Thomas Waldmann bf00eba1c1 use swidth when doing terminal output width computations, fixes #1051
cjk glyphs occupy 2 cells' width on the terminal.
2016-05-18 18:32:29 +02:00
Thomas Waldmann 596a276a26 setup.py: add check for platform_darwin.c
this was just forgotten...
2016-05-18 18:07:10 +02:00
TW 5c6cfc6329 Merge pull request #1058 from enkore/issue/1056
When probing key files, do binary reads
2016-05-18 17:56:26 +02:00