Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/203632

Change subject: Use parentRevId for three-way merge
......................................................................

Use parentRevId for three-way merge

When attempting automated rebase from the previous revision onto the current
revision, take parentRevId to be the content's old revision, rather than the
"baseRevision", which was derived from edittime.

Bug: T58849
Change-Id: I005e45de6d417f4cbe753f69b86c85dc7614268e
---
M includes/EditPage.php
1 file changed, 1 insertion(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/203632/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index c56dd48..2483973 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -281,9 +281,6 @@
        public $hasPresetSummary = false;
 
        /** @var bool */
-       public $mBaseRevision = false;
-
-       /** @var bool */
        public $mShowSummaryField = true;
 
        # Form values
@@ -1970,7 +1967,7 @@
                $db = wfGetDB( DB_MASTER );
 
                // This is the revision the editor started from
-               $baseRevision = $this->getBaseRevision();
+               $baseRevision = Revision::newFromId( $this->getParentRevId() );
                $baseContent = $baseRevision ? $baseRevision->getContent() : 
null;
 
                if ( is_null( $baseContent ) ) {
@@ -1997,18 +1994,6 @@
                }
 
                return false;
-       }
-
-       /**
-        * @return Revision
-        */
-       function getBaseRevision() {
-               if ( !$this->mBaseRevision ) {
-                       $db = wfGetDB( DB_MASTER );
-                       $this->mBaseRevision = Revision::loadFromTimestamp(
-                               $db, $this->mTitle, $this->edittime );
-               }
-               return $this->mBaseRevision;
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/203632
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I005e45de6d417f4cbe753f69b86c85dc7614268e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to