Patchwork [09,of,10] localrepo: move store to baselocalrepository

login
register
mail settings
Submitter Jun Wu
Date Feb. 10, 2017, 1:46 a.m.
Message ID <2c2051dfbf9079a294cd.1486691183@localhost.localdomain>
Download mbox | patch
Permalink /patch/18382/
State Deferred
Headers show

Comments

Jun Wu - Feb. 10, 2017, 1:46 a.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1486689500 28800
#      Thu Feb 09 17:18:20 2017 -0800
# Node ID 2c2051dfbf9079a294cded41ada42b67dd3c37f5
# Parent  e042a694438fc4b35edcdcda99a4b6c4a0ce5bf2
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 2c2051dfbf90
localrepo: move store to baselocalrepository

See previous patches for why.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -287,4 +287,11 @@  class baselocalrepository(object):
                 raise
 
+        self.store = store.store(
+                self.requirements, self.sharedpath, scmutil.vfs)
+        self.spath = self.store.path
+        self.svfs = self.store.vfs
+        self.sjoin = self.store.join
+        self.vfs.createmode = self.store.createmode
+
     def _loadextensions(self):
         # baselocalrepository is side-effect free, so "loading extensions" is a
@@ -334,10 +341,4 @@  class localrepository(baselocalrepositor
                                                 realfs=False)
 
-        self.store = store.store(
-                self.requirements, self.sharedpath, scmutil.vfs)
-        self.spath = self.store.path
-        self.svfs = self.store.vfs
-        self.sjoin = self.store.join
-        self.vfs.createmode = self.store.createmode
         self._applyopenerreqs()
         if create: