Repository navigation
feat(interactive)!: Add interactive diff / overwork diff output - #1480
Conversation
|
First of all, thank you very much for working on this, I use and enjoy rustic a lot. Initial thoughts: Actually I see theres already a Some sort of progress while computing the sizes would be nice, as right now it just freezes until its done. It took about a minute or so before it was responsive again for me. Now that its done: The sizes seem to be just bytes, which is difficult to parse at a glance. It would be nice if there was a toggle between "human units" and "raw bytes", because most of the time its a large magnitude difference i want to see at a glance(ie, GB vs MB, the exact size is usually noise, but the option is nice to have), Oh wait, as i was writing this i realized the sizes are probably? for the two selected snapshots? but which is which? is it the order i marked them? Their values are also maybe are partially off-screen? Perhaps there should be a shortcut to show details in a popup, like the That would mean it can be far more verbose, with information like "In Snapshot () from , this folder was " for the two selected snapshots. That would be really useful, because i dont know which ID, or which the I assume RepoSize is the size in the actual repo, with compression and etc, and Size is the theoretical on-disk size?
Also something that would be nice, the ability to see the snapshot information for the two snapshots i am comparing, my working memory is short so i forgor. Maybe Also I accidentally backed out back(using the left arrow key) to the snapshot selection screen, and comparing them again noticed: My choice for whether to show only modified files remained, but the size computation had to be done again. Perhaps a prompt to confirm backing out? Thank you very much for your time |
|
Thanks for testing this PR @DianaNites and for your improvement suggestions! You already found build.sh. I don't know if there is a better option to set the version...
I agree. A progress bar is however hard as we need to recurse into subtrees and cannot say how many trees to load. I'll add an "in progress" information. But I don't know if I may postpone this to a later version..
I changed it to use human units. If you need to toggle, please open a feature request ;-)
Yes, sizes and modification times are for old and new snapshot.
Yes, exactly. But currently only file sizes are taken into account while tree metadata size is neglected.
For files, it works but if you only have changed content in combination with changed metadata, there won't be any difference in those views...
Good idea, I'll see if I can add it soon!
Is added. |
|
Ah, and one comment about the +/-Reposize: For example, you can have big changes on RepoSize when comparing 'dir/a' (old/new) and 'dir/b', respectively, but only have a small change when comparing 'dir'. An extreme example is when you renamed some dir. This obviously does not contribute to the RepoSize, but once you dive into the old or new dir, you will only see added or removed space;-) |
It does know the current one and how many its done so far, right? Something like "Computing (/??), a sign that forward progress is being made |
|
@DianaNites progress information and the title showing snapshots/current path has now been added. |
|
Thank you, the progress seems to be working fine and is very useful. |
|
Most features are now implemented @DianaNites, can you have a look if things are like you expected? The |
|
Thank you so much once again for your work on this. I have already been able to find and exclude from backup a few unnecessary and fairly large cache directories i'd missed excluding. Testing the latest commit, be3fe53, the The information currently displayed is perfectly usable right now, and has the information I need so I know and don't have to keep in my head what i'm comparing, their relative sizes, description, dates. Unrelated to the Also the paths in the header are nice to see and especially copy paste, but become difficult to see/use for deeply nested paths because the same path is shown twice, once for each snapshot. Its not actually possible for them to differ in this view, right? |
|
Thanks @DianaNites for testing! The
In fact it is possible to differ, as |
## 🤖 New release * `rustic-rs`: 0.9.5 -> 0.10.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.10.0](v0.9.5...v0.10.0) - 2025-09-12 ### Added - Add --name option to select snapshot(s) from config to backup ([#1531](#1531)) - *(commands)* make group_by a global option ([#1545](#1545)) - Add environment variables to the hooks ([#1518](#1518)) - *(commands)* copy checks all chunker constellations ([#1530](#1530)) - *(interactive)* Add possibility to change snapshot hostname ([#1498](#1498)) - OpenTelemetry Protocol support for metrics ([#1473](#1473)) - *(interactive)* Reduce memory consumption of summary ([#1489](#1489)) - *(interactive)* remember summary when switching snapshot/ls/diff views ([#1485](#1485)) - *(interactive)* [**breaking**] Add interactive diff / overwork diff output ([#1480](#1480)) - *(interactive)* ls: Add options to compute cumulative statistics ([#1479](#1479)) - *(commands)* Add missing key subcommands ([#1385](#1385)) - *(commands)* [**breaking**] Fine-tune output for snapshots command when no grouping is given ([#1375](#1375)) - *(diff)* Use local PATH1 as PATH2 if no new snapshot/path is given ([#1474](#1474)) - *(commands)* [**breaking**] Extend logging ([#1463](#1463)) - push prometheus metrics to pushgateway on-demand ([#1404](#1404)) - Allow to use OPENDAL_HOT_* and OPENDAL_COLD_* env variables ([#1392](#1392)) ### Fixed - sanitize paths after run-before hook ([#1549](#1549)) - Handle dry-run for all commands ([#1546](#1546)) - fix clippy lints ([#1533](#1533)) - cargo update openssh-sftp-client ([#1510](#1510)) - Don't allow wrong commands in front of valid ones ([#1464](#1464)) - fix clippy lints - rename OPENDAL_HOT_*/COLD_* to OPENDALHOT_*/COLD_* ([#1393](#1393)) - fix clippy lint - *(commands)* remove SIGPIPE default handler ([#1431](#1431)) - fix clippy lints - *(config)* set a non-zero default progress interval for progress options ([#1378](#1378)) ### Other - update dependencies ([#1556](#1556)) - *(deps)* bump tracing-subscriber from 0.3.19 to 0.3.20 ([#1544](#1544)) - [**breaking**] Remove --filter-fn from default ([#1482](#1482)) - update rustic_core ([#1541](#1541)) - update rustic_core ([#1519](#1519)) - *(config)* Correct the `exclude-if-present` option descritption ([#1506](#1506)) - update to latest rustic_core ([#1491](#1491)) - clippy lints - Use rustic_core development version ([#1476](#1476)) - code formatting - adapt to latest rustic_core ([#1456](#1456)) - use 2024 edition ([#1453](#1453)) - update prometheus version - dependency updates - *(deps)* bump zip from 2.2.1 to 2.3.0 ([#1432](#1432)) - *(deps)* bump ring from 0.17.8 to 0.17.13 ([#1424](#1424)) - Add Homebrew instructions ([#1416](#1416)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). --------- Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com> Co-authored-by: Alexander Weiss <alex@weissfam.de>

Adds the possibility to compare two snapshots interactively.
From the interactive snapshots view, press
Dto get to the diff view.If two snapshots are marked, this diffs the two marked snapshots. If one snapshot is marked or selected, this diffs with its parent (if there is one).
Alternatively, you can use
rustic diff -ito select snapshots/paths directly.The PR also allows to recursively compute added/removed space for dirs and subdirs using
s(like in #1479)This PR is breaking as it also changes the output format of the normal
diffcommand.