This commit is contained in:
Joey Hess 2017-11-14 15:43:40 -04:00
parent 2f7de67829
commit b5e1534c5c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,13 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2017-11-14T19:19:30Z"
content="""
It indeed would be possible for `copy --to` to check the actual file
size when the key does not have a known size, and use that for progress.
I don't know how hard it would be.
Note that, even if that were done, there's no guarantee that a given remote
will update progress information, and if it doesn't, --json-progress
won't result in any. So your code certianly needs to handle that case.
"""]]

View file

@ -0,0 +1,20 @@
[[!comment format=mdwn
username="joey"
subject="""comment 2"""
date="2017-11-14T19:29:21Z"
content="""
Messages.Progress.metered is what looks at the keySize, and when it's
not known, displays no meter. So it would need an additional Maybe FilePath
that's the file being uploaded, to look at when the keySize is not known.
That does not seem too hard a change to make; I'm not convinced the extra
complexity is worth it, since this would only add progress for uploads,
and not for downloads.
There is something to be said for consistency;
and if some transfers of a key have progress and others do not,
it seems the user might get confused, while if nothing does, the user
can conclude that git-annex is not able to provide progress for a key
that does not contain a size, and if they don't like that, avoid
things that generate such keys.
"""]]