Commit Graph

1524 Commits

Author SHA1 Message Date
Thomas Waldmann 8493cfb0f1 fix .coverragerc omits
seems like they need a */ prefix

also: exclude everything below support/ - this is 3rd party stuff.
2015-11-01 22:18:47 +01:00
TW 12758f1a19 Merge pull request #354 from ThomasWaldmann/cleanup-confirmations
Cleanup confirmations
2015-11-01 19:44:54 +01:00
Thomas Waldmann 0a6e6cfe2e refactor confirmation code, reduce code duplication, add tests 2015-11-01 19:18:29 +01:00
Thomas Waldmann 36900051c5 move test utilities to testsuite package, add FakeInputs utility 2015-11-01 19:13:45 +01:00
TW 37a02a89ab Merge pull request #352 from ThomasWaldmann/issue-351
Issue 351
2015-11-01 01:12:05 +01:00
Thomas Waldmann 4a1c995244 add --show-rc option enable "terminating with X status, rc N" output, fixes #351
this is needed for tools like borgweb (or in general: when the rc value / exit status should
be logged for later review or directly seen on screen).

this is off by default, so the output is less verbose (and also does not fail tests which
counts lines).
2015-11-01 00:53:55 +01:00
Thomas Waldmann 4bf8c8a6f8 separate parse_args() from run()
parse_args concentrates on only processing arguments, including pre and post processing.
this needs to be called before run(), which is now receiving the return value of parse_args.

this was done so we can have the parsed args outside of the run function, e.g. in main().
2015-11-01 00:40:32 +01:00
Thomas Waldmann 7ea701f6f7 fix test failure for borg.exe
fatal error is rc 2 now (EXIT_ERROR)
2015-11-01 00:01:23 +01:00
TW f651b014e6 Merge pull request #350 from ThomasWaldmann/fix-307
prettier connection closed message, fixes #307
2015-10-31 23:19:26 +01:00
TW 5f86959762 Merge pull request #349 from ThomasWaldmann/pretty-errors
prettier error messages, fixes #57
2015-10-31 22:44:04 +01:00
TW 39e4f344bd Merge pull request #348 from ThomasWaldmann/warn-slow-msgpack
emit a warning if we have a slow msgpack installed
2015-10-31 22:43:36 +01:00
TW d41f7d1e09 Merge pull request #344 from rpodgorny/no-rawconfigparser
move away from RawConfigParser to ConfigParser
2015-10-31 22:43:08 +01:00
Thomas Waldmann 1740384763 prettier connection closed message, fixes #307 2015-10-31 22:41:08 +01:00
Thomas Waldmann 762fdaadd8 prettier error messages, fixes #57
subclasses of "Error": do not show traceback
(this is used when a failure is expected and has rather trivial reasons and usually
does not need debugging)

subclasses of "ErrorWithTraceback": show a traceback
(this is for severe and rather unexpected stuff, like consistency / corruption issues
or stuff that might need debugging)

I reviewed all the Error subclasses whether they fit into the one or other class.

Also: fixed docstring typo, docstring formatting
2015-10-31 22:23:32 +01:00
Thomas Waldmann 3490469734 emit a warning if we have a slow msgpack installed
the reason for a slow msgpack can be:
- pip install: missing compiler (gcc)
- pip install: missing compiler parts (e.g. gcc-c++)
- pip install: cached wheel package that was built while the compiler wasn't present
- distribution package: badly built msgpack package
2015-10-31 20:37:21 +01:00
Thomas Waldmann 3c2dee6eb6 vagrant: fix msgpack installation on centos, fixes #342 2015-10-31 19:50:53 +01:00
Thomas Waldmann 44083f7f73 updated CHANGES 2015-10-29 16:22:02 +01:00
Radek Podgorny 5cc25d986a move away from RawConfigParser to ConfigParser
this is a recommended thing since direct use of RawConfigParser
is not deprecated according to python docs.
2015-10-29 02:37:43 +01:00
Thomas Waldmann 5992d4be58 Merge branch 'review-logging-levels' 2015-10-28 02:02:33 +01:00
TW b4aab655c1 Merge pull request #341 from ThomasWaldmann/python35
also test py35 on travis
2015-10-27 23:25:58 +01:00
Thomas Waldmann 9d0d37fab0 also test py35 on travis 2015-10-27 23:06:32 +01:00
TW b4535471f6 Merge pull request #340 from ThomasWaldmann/fix-fuse-locking
fuse mount: fix unlocking of repository at umount time, fixes #331
2015-10-27 23:01:05 +01:00
Thomas Waldmann dd577bf4ac fuse mount: fix unlocking of repository at umount time, fixes #331
there were 2 issues:
lock used another pid and tid than release because daemonize() made it different processes/threads.
solved by just determining PID only once and not using TID any more.

the other issue was that the repo needed and explicit closing.
2015-10-27 22:37:36 +01:00
Thomas Waldmann b787ac6ea1 docs: remove api docs (too much breakage on rtd) 2015-10-27 20:46:57 +01:00
TW fe87cb9c9f Merge pull request #335 from ThomasWaldmann/save-atime-ctime
backup atime and ctime additionally to mtime, fixes #317
2015-10-26 23:43:04 +01:00
Thomas Waldmann 92d31be087 atime unit test: test adapts to O_NOATIME support on platform 2015-10-26 23:16:41 +01:00
Thomas Waldmann 3e73998710 atime unit test: do not compare input file's current atime
and explain why (missing O_NOATIME open mode modified the atime at backup time).
2015-10-26 23:08:37 +01:00
Thomas Waldmann 765999195d atime unit test: hardcode "round" timestamps
just to avoid rounding / precision issues with floating point computations on py < 3.3
I used 2 hardcoded "full second" values on the input file and check if they get restored
correctly.
2015-10-26 22:34:08 +01:00
Thomas Waldmann c492011a92 backup atime and ctime additionally to mtime, fixes #317
restore: mtime and atime
FUSE: support ctime and atime additionally to mtime
2015-10-26 02:07:55 +01:00
Thomas Waldmann b89b5c2520 Merge branch 'master' of github.com:borgbackup/borg 2015-10-26 01:44:43 +01:00
Thomas Waldmann 0942bc010e fix reading files without touching their atime 2015-10-26 01:43:58 +01:00
Thomas Waldmann f7d724ce33 tests: only use mtime once in directory comparison tuples 2015-10-26 01:37:28 +01:00
Thomas Waldmann f285e90912 archiver: add E status as error indication
E means that an error occured when processing this (single) item
2015-10-25 02:53:36 +02:00
Thomas Waldmann 7b73abdcda archiver: rename print_x methods so they correspond to log levels
also:

remove some "Warning: " msg prefixes - if we emit at WARNING level,
it is obviously a warning.

remove some "borg: " msg prefixes.
2015-10-25 02:35:42 +02:00
TW bfbdbfb315 Merge pull request #332 from ThomasWaldmann/screencast
borgbackup install+basics presentation(asciinema + script)
2015-10-25 00:04:32 +02:00
Thomas Waldmann 42fc22840c embed the asciinema preview image / link into the README 2015-10-25 00:02:50 +02:00
Thomas Waldmann a16ae01289 borgbackup install+basics presentation(asciinema + script) 2015-10-24 23:40:51 +02:00
Thomas Waldmann d8d3c8521b fix logging levels
All normal informational output is now logged at INFO level.
To actually see normal output, the logger is configured to level INFO also.

Log levels:
WARNING is for warnings, ERROR is for (fatal) errors, DEBUG is for debugging.

logging levels must only be used according to this semantics and must not be
(ab)used to let something show up (although the logger would usually hide it)
or hide something (although the logger would usually show it).

Controlling the amount of output shown on INFO level:
--verbose, --progress, --stats are currently used for this.
more such flags might be added later as needed.

if they are set, more output is logged (at INFO level).

also: change strange setup_logging return value
2015-10-23 02:29:41 +02:00
Thomas Waldmann 39fb9b176a update docs about return codes 2015-10-22 01:40:34 +02:00
TW 52fd2ad3da Merge pull request #320 from ThomasWaldmann/final-status
Final status
2015-10-22 01:04:36 +02:00
Thomas Waldmann 5bcd4835e6 add tests for return codes 2015-10-22 00:45:29 +02:00
TW 9c45d703d0 Merge pull request #323 from anarcat/version-arg
add standard --version argument
2015-10-21 16:56:49 +02:00
anarcat 3996caa04f add my email address to authors 2015-10-21 10:51:27 -04:00
Antoine Beaupré bfaa046a31 add standard --version argument
this way the version can be discovered by scripts without having to
part the output of 'help'.

it is removed from the 'help' output itself because it is prettier
without the complete version number, and then the description can be
reused elsewhere as well without needing the version number
2015-10-21 09:58:28 -04:00
TW a1f88c73aa Merge pull request #322 from anarcat/docs
explicitely commit to the units standard
2015-10-21 15:30:23 +02:00
Antoine Beaupré 76c0804bd5 explicitely commit to the units standard, see #289 2015-10-21 09:25:46 -04:00
TW 557d8c7e03 Merge pull request #318 from anarcat/flake8
small flake8 changes
2015-10-21 02:15:22 +02:00
Antoine Beaupré 05c4255620 flake8 cleanup broke the upgrader, re-import Repository 2015-10-20 19:54:57 -04:00
Thomas Waldmann 72c984891c refactor return codes, fixes #61
0 = success (logged as INFO)
1 = warning (logged as WARNING)
2 = (fatal and abrupt) error (logged as ERROR)

please use the EXIT_(SUCCESS,WARNING,ERROR) constants from helpers module.
2015-10-21 01:11:51 +02:00
Thomas Waldmann 1439f3be60 give a final status into the log output, including exit code, fixes #58 2015-10-20 23:57:56 +02:00