Fossil Forum

finfo history when content reverts: feature or bug?
Login

finfo history when content reverts: feature or bug?

finfo history when content reverts: feature or bug?

(1) By Stephan Beal (stephan) on 2020-05-04 10:28:03 [source]

While testing the new /fileedit page i just tripped over an interesting property of the /finfo page:

When the content of a file is changed such that its hash reverts to a value that file had in the past, the finfo history shows only the original entry for that hash, and not the newly-edited/reverted one.

Why it's happening is clear. My question is whether or not it would make sense to also include history entries where a file reverted to an older hash, or would that just be noise?

An interesting, but purely cosmetic, corner-case side effect of the current behaviour was uncovered by the fileedit page: when a file is saved, the editor updates its link to the /finfo page for that file, passing it name=FILE&m=CHECKIN with the new checkin hash. When, however, that file was reverted to an older version in that checkin, there is no finfo entry for that file/checkin combination, so the highlighting normally performed by the m=CHECKIN part has no effect (that checkin doesn't appear in the list, though the file was technically part of that commit). (This isn't a problem, it's just interesting in a geeky sort of way.)

(2) By Richard Hipp (drh) on 2020-05-04 12:26:18 in reply to 1 [link] [source]

/finfo shows the first occurrence of each artifact in the history of the project. That way, each different version of the file only appears in the graph once. I've gone round and round trying to get /finfo to display useful file change timelines, and this algorithm seems to be the one that works the best. It does have the downside that it does not show when files are reverted. But I don't have a solution for that.

If you try to show every time a file changes, it repeats the file on every branch merge, and you end up with a tangled graph that is difficult to make sense of. I used to have a query parameter to show the graph in that format, in case you wanted to see all the details, but that query parameter seems to have been removed at some point.

(3) By Stephan Beal (stephan) on 2020-05-04 12:49:09 in reply to 2 [link] [source]

But I don't have a solution for that.

Not a problem - it just seemed curious. It only came up because, while testing /fileedit, i keep making an undoing the same 1-byte change between saves.