daniel added a comment.
Pseudo-code for `saveRevisionRecord()` // assume we are in a db transaction $this->checkIsCurrentRevision( $this->baseRevision ); // protect against race condition $model = $slots['main']->getModel(); // "main" model must always be there $length = SUM( $slots[*]->getModel() ); $hash = count($slots) < 2 ? $slots[0]->getHash() : HASH( $slots[*]->getHash() ); // special case for b/c $revId = $this->insertRevision( $user, $comment, $timestamp, $model, $length, $hash, $parentRev, ... ); foreach ( $slots as $name => $slot ) { $this->insertSlot( $revId, $name, $slot ); } $this->updatePage( $this->title, $revId ); // make the new revision the current revision. TASK DETAIL https://phabricator.wikimedia.org/T107595 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: daniel Cc: JJMC89, RobLa-WMF, Yurik, ArielGlenn, APerson, TomT0m, Krenair, intracer, Tgr, Tobi_WMDE_SW, Addshore, Lydia_Pintscher, cscott, PleaseStand, awight, Ricordisamoa, GWicke, MarkTraceur, waldyrious, Legoktm, Aklapper, Jdforrester-WMF, Ltrlg, brion, Spage, MZMcBride, daniel, D3r1ck01, Izno, Luke081515, Wikidata-bugs, aude, jayvdb, fbstj, Mbch331, Jay8g, bd808 _______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs