Commit Graph

727 Commits

Author SHA1 Message Date
Thomas Waldmann 4be5f312d7 Merge branch 'fix_atime' into merge 2015-04-05 18:11:16 +02:00
Thomas Waldmann 1bf5e9ee29 Merge PR #265 - fixes bug #268 - Merge branch 'fix_safe_re' of https://github.com/lealanko/attic into merge 2015-04-04 11:05:52 +02:00
Lauri Alanko 89e9528d0b Escape ".." in path regexp properly. 2015-04-03 00:19:33 +03:00
Thomas Waldmann e706d1e2e0 PR #258 - Merge branch 'platform_linux_optimize' into merge 2015-04-01 02:13:26 +02:00
Thomas Waldmann 570b8f8231 linux: remove duplicate os.fsencode calls 2015-04-01 02:11:36 +02:00
Thomas Waldmann dc58cf9b35 PR #254 - Merge branch 'tests_32bit_platform' into merge 2015-03-26 01:36:43 +01:00
Thomas Waldmann 8b2b91fb0c Fix test setup for 32bit platforms, partial fix for #196 2015-03-26 01:23:25 +01:00
Thomas Waldmann d43cb4bac8 refactor _open_rb code a bit, so it is more consistent / regular 2015-03-24 22:08:06 +01:00
Thomas Waldmann 3d2a3d11af PR #251 - Merge branch 'rename_archive' into merge 2015-03-24 07:19:01 +01:00
Thomas Waldmann 9f6840dddb implement attic rename repo::oldname newname
I extracted the inner part of Archive.load into a new _load_meta method
that does not modify self and does not decode, so I could simply reuse it.
2015-03-24 07:11:00 +01:00
Thomas Waldmann 8a60f05736 PR #250 - Merge branch 'progress_indication' into merge 2015-03-24 04:30:13 +01:00
Thomas Waldmann 231721d133 implemented create --progress
shows original, compressed and deduped size plus path name.

output is 79 chars wide, so 80x24 terminal does not wrap/scroll.

long path names are shortened (in a rather simplistic way).

output happens when a new item is started, but not more often than 5/s
(thus, not every pathname is shown)

at the end, the output line is cleared but not scrolled, so it basically vanishes.
2015-03-24 04:24:54 +01:00
Thomas Waldmann 2c2dd21e0e PR #224 - Merge branch 'issue_55' into merge 2015-03-22 15:58:08 +01:00
Thomas Waldmann 6d67379c08 refactor indicator (status) and item processing
process_item was used only for dirs and fifo, replaced it by process_dir and process_fifo,
so the status can be generated there (as it is done for the other item types).
2015-03-22 15:52:43 +01:00
Thomas Waldmann 22ae80e1ac add condensed description of the changes in merge branch 2015-03-22 14:55:02 +01:00
Thomas Waldmann 57b1b3dbec PR #246 - Merge branch 'remote_exceptions' into merge 2015-03-21 02:22:51 +01:00
Thomas Waldmann c679f1a6f0 catch all Exceptions, transmit traceback back from remote
before this changesets, most informations about exceptions/tracebacks
on the remote side were lost. now they are transmitted and displayed,
together with the remote attic version.
2015-03-21 02:17:19 +01:00
Thomas Waldmann dd8ff50a5c PR #245 - Merge branch 'fix_exceptions' into merge
Conflicts:
	attic/archive.py
2015-03-20 02:34:10 +01:00
Thomas Waldmann 2da70c7d7a fix some exception handlers
don't catch "Exception" when OSError was meant (otherwise e.errno is not there anyway)
don't use bare "except:" if one can avoid (copied code fragment from similar handler)
2015-03-20 02:31:39 +01:00
Thomas Waldmann f31897bb1f PR #244 - Merge branch 'fix_atime' into merge 2015-03-20 01:43:04 +01:00
Thomas Waldmann 8fba904b16 fix noatime mode, fixes #243
added "nonlocal euid" - without this, euid just gets redefined in inner scope instead of assigned to outer scope
added check for euid 0 - if we run as root, we always have permissions (not just if we are file owner)

note: due to caching and OS behaviour on linux, the bug was a bit tricky to reproduce
and also the fix was a bit tricky to test.

one needs strictatime mount option to enfore traditional atime updating.

for repeated tests, always change file contents (e.g. from /dev/urandom) or attic's caching
will prevent that the file gets read ("accessed") again.

check atimes with ls -lu

i could reproduce code was broken and is fixed with this changeset. and root now doesn't touch any atimes.
2015-03-20 01:40:51 +01:00
Thomas Waldmann fd16debb05 PR #235 - Merge branch 'fix_xattr' into merge 2015-03-18 18:21:21 +01:00
Thomas Waldmann 767e795597 dummy acl implementation for unsupported platforms
the API_VERSION there was not in sync (and that was even true, as "st" was missing in acl_get()) - fixed.
2015-03-18 18:21:04 +01:00
Thomas Waldmann f1af650d9e PR #235 - Merge branch 'fix_xattr' into merge 2015-03-18 17:48:48 +01:00
Thomas Waldmann 1fe844a896 dummy xattr implementation for unsupported platforms
raising "Unsupported platform" (and making attic completely unusable) just because there is no xattr support isn't necessary.
2015-03-18 17:45:05 +01:00
Thomas Waldmann c4f3068c55 PR #241 - Merge branch 'patch-1' of https://github.com/adept/attic into merge 2015-03-18 15:30:53 +01:00
Dmitry Astapov 6be2734b7e Do not create items_buffer and chunker unless we are creating new archive
Listing repositories with lots of archives on low-memory systems would cause attic to run out of memory due to items_buffer and chunker being created for each visited archive.

See https://github.com/jborg/attic/issues/163
2015-03-18 12:42:28 +00:00
Thomas Waldmann 3daaceb6bf PR #238 - Merge branch 'fix_fuse_error_msg' into merge 2015-03-18 03:22:38 +01:00
Thomas Waldmann ee1dc89b52 fix misleading hint the fuse ImportError handler gave, fixes #237 2015-03-18 02:33:34 +01:00
Thomas Waldmann b7cefacb69 Merge branch 'python_cleanup' into merge
Conflicts:
	attic/archiver.py
	attic/remote.py
2015-03-18 00:23:41 +01:00
Thomas Waldmann e9aacad9a3 remove unused imports 2015-03-17 23:54:05 +01:00
Thomas Waldmann 4ef6125f45 cleanup pep8 issues found by pycharm 2015-03-17 23:47:21 +01:00
Thomas Waldmann 3a33d57c7d triple-double-quotes for docstrings 2015-03-17 23:23:56 +01:00
Thomas Waldmann a21da5d2e0 no bare except 2015-03-17 23:16:12 +01:00
Thomas Waldmann dee9869a03 use "with" with open() 2015-03-17 23:09:14 +01:00
Thomas Waldmann fec5572836 no Class(object) in py3 2015-03-17 23:03:36 +01:00
Thomas Waldmann 2f5e5e01ea PR #235 - Merge branch 'fix_xattr' into merge 2015-03-15 00:22:01 +01:00
Thomas Waldmann 6116fa72b2 give specific path to xattr.is_enabled(), disable symlink setattr call that always fails 2015-03-15 00:20:50 +01:00
Thomas Waldmann 89ffe98ba2 PR #234 - Merge branch 'fix_pipe' into merge 2015-03-14 20:53:06 +01:00
Thomas Waldmann cbbe0fcc9b serve: use os.write(stdout_fd, ...), fixes #233
this way, serve() is more consistent with the other code, which always uses os.read/write (not sys.std*.buffer.read/write).

also: reduce code duplication a bit.
2015-03-14 19:45:01 +01:00
Thomas Waldmann 615ca87c17 Merge branch 'msgpack_corruption' into merge 2015-03-12 20:07:46 +01:00
Thomas Waldmann 4c7d0762a9 as msgpack-python 0.4.6 is released now, just use that. 2015-03-12 20:06:53 +01:00
Thomas Waldmann 60ac104a8f PR #231 - Merge branch 'check_last_N' of https://github.com/ThomasWaldmann/attic into merge 2015-03-11 03:12:37 +01:00
Thomas Waldmann 90c50e3171 implement check --last N
Note: of course it can only check for orphaned objects, if it has processed all archives in the repo.
Thus this check is skipped as soon as you give --last N option.

The numbers shown in progress indicator are (N,T).
N is the number of the currently checked archive (starts at T as it first checks latest archive).
T is the total number of archives.
2015-03-11 03:04:12 +01:00
Thomas Waldmann 97b5154fc5 check: sort archives in reverse time order 2015-03-10 01:11:18 +01:00
Thomas Waldmann f1fe5be4c1 PR #230 - Merge branch 'msgpack_corruption' of https://github.com/ThomasWaldmann/attic into merge 2015-03-09 23:38:19 +01:00
Thomas Waldmann a67d4219c3 avoid defect python-msgpack releases, fixes #171, fixes #185 2015-03-09 23:35:56 +01:00
Thomas Waldmann 8aebdd6c5b PR #229 - Merge branch 'fix_127' of https://github.com/ThomasWaldmann/attic into merge 2015-03-09 22:08:15 +01:00
Thomas Waldmann becae42618 check unpacked data from RPC for tuple type and correct length, fixes #127 2015-03-09 21:59:10 +01:00
Thomas Waldmann 67eaa9d654 PR #225 - Merge branch 'fix_cache_close' of https://github.com/ThomasWaldmann/attic into merge 2015-03-09 16:21:15 +01:00