Hi, can someone please tell me a use case for sha1 in revisions? https://www.mediawiki.org/wiki/API:Revisions
(Of course, I tried first on talk page.)
This kind of sounds like a non-answer, but its mostly useful if you want a hash of the revision. I dont think mw core really uses it, but it can be useful for quickly detecting duplicate revisions. I think primarily it is for external users.
-- Brian
On Wednesday, March 22, 2023, Bináris wikiposta@gmail.com wrote:
Hi, can someone please tell me a use case for sha1 in revisions? https://www.mediawiki.org/wiki/API:Revisions
(Of course, I tried first on talk page.)
Bináris
Thanks!
Brian Wolff bawolff@gmail.com ezt írta (időpont: 2023. márc. 23., Cs, 7:06):
This kind of sounds like a non-answer, but its mostly useful if you want a hash of the revision. I dont think mw core really uses it, but it can be useful for quickly detecting duplicate revisions. I think primarily it is for external users.
-- Brian
On Wednesday, March 22, 2023, Bináris wikiposta@gmail.com wrote:
Hi, can someone please tell me a use case for sha1 in revisions? https://www.mediawiki.org/wiki/API:Revisions
(Of course, I tried first on talk page.)
Bináris
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Afair this avoids a new rev to be createad if you click "save" without changing contents.
Vito
Il giorno gio 23 mar 2023 alle ore 11:35 Bináris wikiposta@gmail.com ha scritto:
Thanks!
Brian Wolff bawolff@gmail.com ezt írta (időpont: 2023. márc. 23., Cs, 7:06):
This kind of sounds like a non-answer, but its mostly useful if you want a hash of the revision. I dont think mw core really uses it, but it can be useful for quickly detecting duplicate revisions. I think primarily it is for external users.
-- Brian
On Wednesday, March 22, 2023, Bináris wikiposta@gmail.com wrote:
Hi, can someone please tell me a use case for sha1 in revisions? https://www.mediawiki.org/wiki/API:Revisions
(Of course, I tried first on talk page.)
Bináris
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
-- Bináris _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Vi to vituzzu.wiki@gmail.com ezt írta (időpont: 2023. márc. 23., Cs, 12:03):
Afair this avoids a new rev to be createad if you click "save" without changing contents.
Great! Thx.
On Wed, Mar 22, 2023 at 11:06 PM Brian Wolff bawolff@gmail.com wrote:
This kind of sounds like a non-answer, but its mostly useful if you want a hash of the revision. I dont think mw core really uses it, but it can be useful for quickly detecting duplicate revisions. I think primarily it is for external users.
Core does duplicate detection (when so configured) for adding the revert / reverted change tags.
On Thu, Mar 23, 2023 at 4:03 AM Vi to vituzzu.wiki@gmail.com wrote:
Afair this avoids a new rev to be createad if you click "save" without changing contents.
That actually uses to slot sha1 now (I guess as a micro-optimization because that way you don't need to re-hash slots which weren't edited).
As for external use, it's very useful. Before MW instrumented reverts, we have ~20 years of revisions and we don't know which ones revert previous revisions. With the sha, we join and determine this information. You can see that code here https://gerrit.wikimedia.org/r/plugins/gitiles/analytics/refinery/source/+/refs/heads/master/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/mediawikihistory/denormalized/DenormalizedRevisionsBuilder.scala#201, and the use of sha1.
On Thu, Mar 23, 2023 at 2:16 PM Gergő Tisza gtisza@gmail.com wrote:
On Wed, Mar 22, 2023 at 11:06 PM Brian Wolff bawolff@gmail.com wrote:
This kind of sounds like a non-answer, but its mostly useful if you want a hash of the revision. I dont think mw core really uses it, but it can be useful for quickly detecting duplicate revisions. I think primarily it is for external users.
Core does duplicate detection (when so configured) for adding the revert / reverted change tags.
On Thu, Mar 23, 2023 at 4:03 AM Vi to vituzzu.wiki@gmail.com wrote:
Afair this avoids a new rev to be createad if you click "save" without changing contents.
That actually uses to slot sha1 now (I guess as a micro-optimization because that way you don't need to re-hash slots which weren't edited). _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
wikitech-l@lists.wikimedia.org