Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
|
|
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
|
|
clap version 3 basically replaces structopt entirely.
Sponsored-by: author
|
|
This will make it easier to change later, if need be. We may want to
do that for various reasons, such as to save space. We may also want
to change things to only use integer types that SQLite can handle: u64
is currently not well handled by our database layer. However, as this
is a refactor, there's no change or fix to that.
FileId is now explicitly a database integer. This doesn't break
anything, for now, as the underlying integer type is still u64.
Also, change a couple of places where it will matter if DbInt changes
away from u64, and disable warnings for harmless conversions that
may cause warnings depending on what type DbInt has.
Sponsored-by: author
|
|
Backups made with this version can't be restored with old clients, and
vice version.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
This is clearer and less error prone.
Sponsored-by: author
|
|
There is only async.
Sponsored-by: author
|
|
Also, make it an error for a public symbol to not be documented.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
For chmod() we need to cast mode parameter from u32 to u16 because
MacOS has 16 bit mode_t while Linux is using 32 bits.
|
|
This means a ChunkId can't be used instead.
Sponsored-by: author
|
|
This will make it harder to accidentally use a string. Can still be
confused with a chunk id.
Sponsored-by: author
|
|
Mostly
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow.
Sponsored-by: author
|
|
Sponsored-by: author
|
|
|
|
Change calls to set_message to pass ownership of the message, rather
than just letting it borrow the message.
Sponsored-by: author
|
|
The weird thing about this commit is that all the tests for it already
exist: the subplot compares manifests of "live" and restored data, and
that includes the mtime. The subplot passes on CI, and it passed for me
too — until today.
Today, if I run `./check` on the main branch (which is currently at
481c5d8df21c72db3a3d76e851d25426f3e40647), subplot fails because the
symlinks' mtime is wrong. Most often it's just the nsec part that's
wrong: tests run fast enough that they finish within a second, and they
rarely happen at the edge of the second.
I don't understand why this didn't happen to me before, and why it
doesn't happen to CI — and to Lars, for that matter. git-bisect points
at 755c18a11f87040245964cf411ea8f518b61e0f5, which is a couple months
old, so we should've spotted the breakage by now.
Needless to say, I didn't do any major overhauls of my system lately,
just your usual `apt upgrade` (Debian bullseye/testing amd64). Did some
change in Subplot or Summain obfuscate this? It bothers me that I don't
understand how we could miss this for so long.
|
|
All unclear error messages should now be clearer. For example, all the
ones related to a file mention the file name and the attempted
operation that failed.
|
|
|
|
|
|
`LocalGeneration::sql::files()` runs an SQL query, iterates over the
results and collects the rows into a `Vec`. This can fail at any step:
the query might fail to run, or one of the rows might fail to be fetched
or processed.
Right now, we lump all those failures into a `Result` that wraps the
whole return value. This is only possible because we process each row
before returning. Once `Vec` is replaced by an iterator, we won't have
that luxury anymore, so we now wrap each individual element into its own
`Result` (as well as wrapping the whole vector into a `Result` of its
own).
|
|
|
|
|
|
|
|
|
|
By not calling NamedTempFile::persist, the files get deleted
automatically when the file is closed or the struct is dropped.
Previously we were deleting the temporary files manually, which meant
that sometimes they weren't deleted if the program crashed at an
unfortunate time.
|
|
|
|
|
|
Such files won't be restored, as they'd be restored as empty file, and
that would be confusing and thus bad.
|
|
Configuration setting can disable it.
|
|
This means that a function that parses step bindings can't return an
error that the document is missing a title. Such an error return would
be nonsensical, and we use the Rust type system to prevent it, at a
small cost of being a bit verbose.
Additional benefit is that the library portion of Obnam doesn't return
anyhow::Result values anymore.
|
|
This speeds startup a lot. However, the backup repository needs to be
re-created from scratch and internal APIs have change in incompatible
ways.
|
|
The struct is easier to use right.
|
|
This changes SQL schema.
|
|
|
|
This splits the use of NascentGeneration to more cohesive "new
generation being built" versus "existing generation being restored".
|
|
|
|
New name is more descriptive.
|
|
This is a step towards changing how filenames are stored in FileSystemEntry.
|
|
|
|
This breaks all invocations of the Obnam client, as the option needs
to come before the subcommand name.
The benefit of this breakage is simpler, less repetitive code.
|
|
|
|
|
|
|
|
The user should not have to specify filenames for the databases, since
they don't actually care where they're stored.
|
|
|
|
|
|
|