This commit is contained in:
Joey Hess 2025-09-30 10:58:01 -04:00
commit 33ab579243
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,23 @@
[[!comment format=mdwn
username="joey"
subject="""git-annex activity"""
date="2025-09-30T14:29:54Z"
content="""
Copying a related idea from @nobodyinperson on [[todo/remove_webapp]]:
Furthermore, a command like `git annex activity` that goes arbitrarily far back in time and statically (non-live) lists recent activities like:
- yesterday 23:32: remote1 downloaded 5 files (45MB)
- today 10:45: you modified file `document.txt` (10MB)
- today 10:46: you uploaded file `document.txt` (from today 10:45) to remote1, remote2 and remote3
- today 12:35: Fred McGitFace modified file `document.txt` (12MB) and uploaded to remote2
- ...
Basically a human-readable (or as JSON), chronological log of things that happened in the repo. This is a superpower of git-annex: all this information is available as far back as one wants, we just don't have a way to access it nicely. `git log` and `git annex log` exist, but they are too specific, too broad or a bit hard to parse on their own. For example:
- `git annex activity --since=\"2 weeks ago\" --include='*.doc'` would list things (who committed, which remote received it, etc.) that happened in the last two weeks to *.doc files
- `git annex activity --only-annex --in=remote2` would list recent annex operations (in the `git-annex` branch only) of remote2
- `git annex activity --only-changes --largerthan=10MB` would list recent file changes (additions, modifications, deletions, etc., in `git log` only)
This `git annex assistant-log` and `git annex activity` would be a very nice feature to showcase git-annex's power (which other file syncing tool can to this? 🤔) and also solve [[todo/Recent_remote_activities]].
"""]]

View file

@ -0,0 +1,11 @@
[[!comment format=mdwn
username="joey"
subject="""comment 5"""
date="2025-09-30T14:31:59Z"
content="""
A `git-annex activity` (or `git-annex log`) could also optionally stream live
activity as it is happening. Eg, when a transfer is started it could display
the start, and then later the end. That would be easy to build with what's
in git-annex already. The assistant already uses the transfer logs that way,
using inotify to notice changes.
"""]]

View file

@ -0,0 +1,24 @@
[[!comment format=mdwn
username="joey"
subject="""Re: git-annex activity"""
date="2025-09-30T14:34:50Z"
content="""
> `git annex activity --since="2 weeks ago" --include='*.doc'
This is essentially the same as `git-annex log` with a path. It also
supports --since and --json. The difference I guess is the idea to also
include information about git commits of the files, not only git-annex
location changes. That would complicate the output, and apparently
`git-annex log`'s output is too hard to parse already. So a design for a
better output would be needed.
> `git annex activity --only-annex --in=remote2`
This is the same as `git-annex log --all` with the output filtered to only
list a given remote. (`--in` does not influence `--all` currently).
> `git annex activity --only-changes --largerthan=10MB`
Can probably be accomplished with `git log` with some
-S regexp.
"""]]

View file

@ -0,0 +1,10 @@
[[!comment format=mdwn
username="joey"
subject="""comment 4"""
date="2025-09-30T14:22:09Z"
content="""
git-annex does support desktop notifications of file uploads/downloads,
via --notify-start and --notify-finish. (When built with dbus support.)
That can be used with the assistant w/o webapp to keep a desktop user
informed about what is going on.
"""]]

View file

@ -0,0 +1,12 @@
[[!comment format=mdwn
username="joey"
subject="""comment 5"""
date="2025-09-30T14:55:25Z"
content="""
I've copied the `git-annex activity` idea over to
[[todo/Recent_remote_activities]] so it doesn't get lost.
I don't think it makes sense to make that a blocker for removing the webapp
though. That would only let an advanced user build some kind of activity
display, doesn't address the needs of most users of the webapp.
"""]]