Commit Graph

1792 Commits

Author SHA1 Message Date
Michael Hanselmann 9747755131 Add pattern matcher wrapper
The utility functions “adjust_patterns” and “exclude_path” produce
respectively use a standard list object containing pattern objects.
With the forthcoming introduction of patterns for filtering files
to be extracted it's better to move the logic of these classes into
a single class.

The wrapper allows adding any number of patterns to an internal list
together with a value to be returned if a match function finds that
one of the patterns matches. A fallback value is returned otherwise.
2016-01-18 20:59:08 +01:00
Michael Hanselmann c1feb4b532 Simplify pattern tests
- Stop using “adjust_pattern” and “exclude_path” as they're utility
  functions not relevant to testing pattern classes
- Cover a few more cases, especially with more than one path separator
  and relative paths
- At least one dedicated test function for each pattern style as opposed
  to a single, big test mixing styles
- Use positive instead of negative matching (i.e. the expected list of
  resulting items is a list of items matching a pattern)
2016-01-18 20:47:22 +01:00
Michael Hanselmann 560a61b634 Add myself to AUTHORS 2016-01-18 20:47:22 +01:00
TW 522c14c6ad Merge pull request #572 from rot13/master
Disable unneeded SSH features in authorized_keys example for security.
2016-01-18 19:15:53 +01:00
Piotr Pawlow 987aaa34df Added SSH key options to the usage example. 2016-01-18 18:49:07 +01:00
Piotr Pawlow a3fa965ded Added no-agent-forwarding,no-user-rc to SSH key options. 2016-01-18 18:39:11 +01:00
TW 59540aa7de Merge pull request #578 from ThomasWaldmann/update-vagrantfile
Vagrantfile: use pyinstaller 3.1, freebsd sqlite3 fix, fixes #569
2016-01-18 18:27:26 +01:00
Thomas Waldmann efec1a396e Vagrantfile: use pyinstaller 3.1, freebsd sqlite3 fix, fixes #569 2016-01-18 18:26:21 +01:00
TW 3b6fdbc57c Merge pull request #574 from rumpelsepp/patch-1
Fix markup in README.rst
2016-01-18 17:06:23 +01:00
Stefan Tatschner 897c763a5b Fix markup in README.rst
Github generated wrong markup, because of a few whitespace errors.
This patch fixes the rst markup of the README.rst file.
2016-01-18 16:30:27 +01:00
TW 735fe557e2 Merge pull request #571 from ThomasWaldmann/fix-570
fix crash when using borg create --dry-run --keep-tag-files, fixes #570
2016-01-18 16:16:54 +01:00
Piotr Pawlow 7851df089a Disable unneeded SSH features in authorized_keys example for security. 2016-01-18 14:35:11 +01:00
Thomas Waldmann 4c00bb0d2f fix crash when using borg create --dry-run --keep-tag-files, fixes #570 2016-01-18 14:30:41 +01:00
TW f2f2810b5a Merge pull request #568 from ypid/docs-fixes
Docs fixes.
2016-01-18 11:02:13 +01:00
Robin Schneider 32900c8679
`Mi` does stand for a IEC binary prefix e.g. 2^20. 2016-01-18 10:38:55 +01:00
Robin Schneider 665c3db2e9
Improved understandability of sentence in deployment.rst.
Thanks to @xor-gate.

Related to https://github.com/borgbackup/borg/pull/529/files#r49952612
2016-01-18 09:32:51 +01:00
Robin Schneider 1f49d16a71
Fixed my changes. Thanks to @ThomasWaldmann for the review! 2016-01-18 09:00:07 +01:00
TW 1878e223d6 Merge pull request #566 from ThomasWaldmann/cache-ctxmgr
implement and use context manager for Cache, partial fix for #285
2016-01-18 01:00:17 +01:00
TW 704b505968 Merge pull request #565 from ThomasWaldmann/repocache-ctxmgr
Repocache ctxmgr
2016-01-18 00:58:23 +01:00
Robin Schneider 8b9ae0ae92
More – → -- (CLI) fixes. Fixed spelling. AES-256 is used.
* According to the comment in `borg/key.py`.
2016-01-17 23:49:54 +01:00
Robin Schneider 576348a9d4
Use HTTPS everywhere. Especially when the website already redirects to HTTPS. 2016-01-17 22:31:08 +01:00
Robin Schneider 89ce86a33b
Fixed more in usage.rst. - → –; – → -- (CLI); Bullet list. 2016-01-17 22:23:54 +01:00
Robin Schneider 1f1ff61375
borg prune only knows "--keep-within" and not "--within". 2016-01-17 21:15:26 +01:00
Robin Schneider 83c5321f53
Fixed RST warning markup. 2016-01-17 20:13:45 +01:00
Robin Schneider 19eb8e2d3b
Use ``--option`` in RST to not render "--" as "–". 2016-01-17 20:12:23 +01:00
Thomas Waldmann 22f218baef implement and use context manager for Cache, partial fix for #285
also: make check in Lock.close more precise, check for "is not None".

note: a lot of blocks were just indented to be under the "with" statement,
in one case a block had to be moved into a function.
2016-01-17 01:15:42 +01:00
Thomas Waldmann 5ec2a3a49b use the RepositoryCache context manager also in fuse code 2016-01-17 00:30:00 +01:00
Thomas Waldmann 4d73f3cdb9 implement and use context manager for RepositoryCache, fixes #548 2016-01-17 00:30:00 +01:00
TW 08e7c546ba Merge pull request #564 from ThomasWaldmann/progress-flags
Progress flags
2016-01-16 21:18:57 +01:00
Thomas Waldmann 2f05e4add9 use the usual commandline arguments order for borg prune examples, fixes #560
borg prune <options> <repo>
2016-01-16 20:57:22 +01:00
Thomas Waldmann 9198f6962c implement --progress option for borg delete <archive> 2016-01-16 20:46:49 +01:00
Thomas Waldmann 0213164d46 implement --progress option for borg upgrade, fixes #291 2016-01-16 20:32:24 +01:00
Thomas Waldmann e68b800d01 remove unused "repair" rpc method
there is no such method in the code.
we use "check" method to repair the repo, so maybe this was left over
from a time when repair was separate from check.
2016-01-16 18:58:52 +01:00
TW c667d330b4 Merge pull request #561 from ThomasWaldmann/fix-locking
fix locking, partial fix for #502
2016-01-16 18:46:13 +01:00
Thomas Waldmann 845d2144cb fix locking, partial fix for #502
the problem was that the borg process removed its own shared lock when upgrading it to an exclusive lock.
this is fine if we get the exclusive lock, but if we don't, we must re-add our shared lock.

this fixes the KeyError in locking.py:217
2016-01-16 18:03:58 +01:00
TW f35ba0b577 Merge pull request #559 from ThomasWaldmann/metastream-chunker
finer chunker granularity for items metadata stream, fixes #547, fixes #487
2016-01-15 22:42:20 +01:00
TW d565274207 Merge pull request #558 from xor-gate/doc-deployment
Docs/deployment: Fixes on incorrect markup
2016-01-15 21:51:04 +01:00
TW d248a7d537 Merge pull request #557 from hansmi/pattern-cleanup
Rename pattern classes and refactor tests
2016-01-15 21:50:04 +01:00
Thomas Waldmann 888e078382 use finer chunker granularity for items metadata stream, fixes #547, fixes #487
the items metadata stream is usually not that big (compared to the file content data) -
it is just file and dir names and other metadata.

if we use too rough granularity there (and big minimum chunk size), we usually will get no deduplication.
2016-01-15 20:56:21 +01:00
TW b8789f7bde Merge pull request #552 from ThomasWaldmann/hashtable-resizing
Hashtable resizing
2016-01-15 20:54:28 +01:00
Jerry Jacobs a1e1ce552c Update README.md with doc|stable shield, minor markup fixes on docs/deployment.rst 2016-01-15 20:02:42 +01:00
Thomas Waldmann ac9d2964a0 exclude hash_sizes.py from coverage testing
this is a one-time tool for developers to generate a value table for borg.
the tool is not used at borg runtime.
2016-01-15 19:52:19 +01:00
TW 37179451bf Merge pull request #556 from LocutusOfBorg/fix-ppa
Move to my ppa and add Trusty/Vivid packages
2016-01-15 19:25:16 +01:00
Michael Hanselmann 3a39ddbd83 Rename pattern classes for consistency
The class names “IncludePattern” and “ExcludePattern” may have been
appropriate when they were the only styles. With the recent addition of
regular expression support and with at least one more style being added
in forthcoming changes these classes should be renamed to be more
descriptive. “ExcludeRegex” is also renamed to match the new names.
2016-01-15 17:16:25 +01:00
Michael Hanselmann 2c7ab8595d Refactor Unicode pattern tests
The unit tests for Unicode in path patterns contained a lot of
unnecessary duplication. One set of duplication was for Mac OS X (also
known as Darwin) as it normalizes Unicode in paths to NFD. Then each
test case was repeated for every type of pattern.

With this change the tests become parametrized using py.test. The
duplicated code has been removed.
2016-01-15 17:16:25 +01:00
Gianfranco Costamagna e644dae793 Move to my ppa and add Trusty/Vivid packages 2016-01-15 13:55:04 +01:00
Thomas Waldmann d08c51bdfc add gource video to resources docs, fixes #507 2016-01-15 10:34:05 +01:00
TW a1b2a834a6 Merge pull request #555 from dannyedel/fix-spelling-errors
docs: Correct small typos in changes and usage
2016-01-15 10:08:53 +01:00
Danny Edel 6cedfbede9 Correct small typos in changes and usage 2016-01-15 09:24:00 +01:00
TW b6c47bad23 Merge pull request #554 from ThomasWaldmann/update-docs
update docs / make them more clear about -v
2016-01-14 22:02:12 +01:00