due to the changed canonicalization for relative pathes in PR #1711 (implement /./ relpath hack),
there would be a changed repo location warning and the user would be asked if this is ok.
this would break automation and require manual intervention, which is unwanted.
thus, we automatically fix the previous_location config entry, if it only changed in the
expected way, but still means the same location.
otherwise it spoils the user's nonces and cache dirs with lots of files.
also: remove all BORG_* env vars from the outer environment
fix get_*_dir tests to use monkeypatch.
API_VERSION is used to check whether the compiled binaries are up-to-date.
the tests for the recent iterator fixes of course need updated (fixed) binaries,
so we bump api_version, so not-up-to-date binaries will get identified.
NSKeyIterator and ChunkKeyIterator raised StopIteration once only when they reached their end.
But they did not raise StopIteration if one called next() again after they were exhausted,
so they did not comply to the standard iterator protocol.
AFAIK, this did not cause actual problems due to the way these iterators are used,
but when I tried to use itertools.islice() to get n-long sequences from these iterators,
it failed / went into an endless loop.
use context manager for signal handler installation / restoration -
this includes the special case of installing handler SIG_IGN to ignore
a signal and restoring the original (non-ignoring) handler.
use SIG_IGN to avoid a 2nd signal interrupts the handling of the 1st signal.
The debug commands all should subcommands of a common debug command.
This commit adds this command but keeps the old command names for 1.0.x.
The plan is to remove them in 1.1.0.
We recommed that users backup their keys, this adds simple to use commands
to do so.
Supported formats are the keyfile format used by borg internally and
a special format with by line checksums for printed backups.
For this format the import is an interactive process which checks
each line as soon as it is input.
Fixes#1555
when screen width was too narrow, the {space} placeholder could get negative,
which crashes as it is a width specification.
now we simplify progress output if screen is narrow.
we stop output completely if screen is ridiculously narrow.
except for the passphrase display as we can only display it as long as we have it in memory,
here: retry, telling the user if he entered something invalid and needs to enter again.