Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2023-07-26 15:44:47 -04:00
commit 588cda3833
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1 @@
Would it be possible for `git annex info` to also show dead remotes (behind an option is fine), to make it easy to find what dead remotes there are? I needed to check what I had done for a service that was going away (AARNET Cloudstor, which used webdav), and was confused as to why it wasn't appearing anywhere.

View file

@ -0,0 +1,44 @@
[[!comment format=mdwn
username="nobodyinperson"
avatar="http://cdn.libravatar.org/avatar/736a41cd4988ede057bae805d000f4f5"
subject="Workaround for listing dead remotes"
date="2023-07-26T17:40:56Z"
content="""
Current workaround is to do some shell magic:
[[!format bash \"\"\"
git show git-annex:trust.log | grep ' X ' | sort -r -k3,3 | sort -u -k1,1 | sort -k3,3
00000000-0000-0000-0000-000000000001 X timestamp=1665735093.590311882s
00000000-0000-0000-0000-000000000002 X timestamp=1665735096.60698876s
bccdc354-3e91-434d-b558-92bda037262f X timestamp=1665756359.672362517s
07e1a2c4-6a48-4149-8c1d-578d01d101ca X timestamp=1666190795.982309234s
6f2f88b1-75b0-4628-aca0-b7e404881787 X timestamp=1666190981.07615739s
c15fa203-2c18-4925-ba00-bf2896c837b8 X timestamp=1666191690.101011744s
9b0e8fa2-6516-489a-a765-535185fd13da X timestamp=1666252027.044902201s
6eece6e9-af12-4493-812b-a93ef37d1c97 X timestamp=1666773713.866014699s
556463c4-498b-4c48-86cf-891d5d350d92 X timestamp=1666773716.613288244s
699550a9-8927-4e39-860f-9391dadf658a X timestamp=1666773720.004014314s
\"\"\"]]
This should be a time-sorted overview of all dead git annex remote IDs (read: get all trust level info from `git-annex`-branch, keep only dead ones, sort reversely by time to then keep only the most up-to-date entry per remote, finally sorting by time again). Unfortunately, `git annex info DEADREMOTEID` doesn't work (Temporarily setting the trustlevel back to something undead e.g. with `git -c remote.DEAD.annex-trustlevel=untrust -c remote.DEAD.annex-uuid=6f2f88b1-75b0-4628-aca0-b7e404881787 annex info` or putting the equivalent in `.git/config` also doesn't work.), so to get the description we need to read it manually from the `git-annex`-branch (provided you didn't run `git annex forget --drop-dead` of course...):
[[!format bash \"\"\"
$ git show git-annex:uuid.log | grep -f <(git show git-annex:trust.log | grep ' X ' | cut -d' ' -f1)
12239c61-893b-409b-8593-242b3bd06d59 hetzner timestamp=1681837014.563205098s
1f010ad0-66f5-4b4d-abb6-c995639ddb8d also broken on Yann IdeaPad timestamp=1674395012.267824079s
1f010ad0-66f5-4b4d-abb6-c995639ddb8d yann@yann-ideapad:~/Sync-broken timestamp=1674392076.605762565s
6726366a-3417-4d87-a5e0-e6c6e174611e broken on Yann IdeaPad timestamp=1674395003.447162736s
6726366a-3417-4d87-a5e0-e6c6e174611e yann@yann-ideapad:~/Sync timestamp=1674392895.243361127s
7eacb3f6-668f-4c76-8a93-e60bb83195e9 yann@yann-ideapad:~/Sync2 timestamp=1672691029.638810716s
92f1c925-5360-4d35-8876-97724e5e8d68 hetzner timestamp=1681841459.689233275s
a295b60b-440e-43be-8d63-a1251b939039 hetzner timestamp=1681837210.139095335s
cc849692-1dca-4d07-889a-2c0b37fef154 hetzner timestamp=1681836822.12092766s
\"\"\"]]
This is as far as it gets in terms of prettiness I'm afraid.
I'd also like an option to show dead remotes, e.g. with `git annex info --all` or `git annex info --show-dead`. And having `git annex info DEADREMOTEID` work would also be nice 🙂
"""]]