comparison mercurial/localrepo.py @ 15922:23921c17299a

phases: mechanism to allow extension to alter initial computation of phase This commit add a whennodata list where extension can register a callback to be called if no phase related data are found in the repository. The goal is to ensure the existing extension that move phase data in 2.1 can compute consistent phase boundary for existing repo.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Wed, 18 Jan 2012 17:23:54 +0100
parents 592b3d1742a1
children 4091660dc130
comparison
equal deleted inserted replaced
15921:92e455f2866c 15922:23921c17299a
35 self.opener = scmutil.opener(self.path) 35 self.opener = scmutil.opener(self.path)
36 self.wopener = scmutil.opener(self.root) 36 self.wopener = scmutil.opener(self.root)
37 self.baseui = baseui 37 self.baseui = baseui
38 self.ui = baseui.copy() 38 self.ui = baseui.copy()
39 self._dirtyphases = False 39 self._dirtyphases = False
40 # A list of callback to shape the phase if no data were found.
41 # Callback are in the form: func(repo, roots) --> processed root.
42 # This list it to be filled by extension during repo setup
43 self._phasedefaults = []
40 44
41 try: 45 try:
42 self.ui.readconfig(self.join("hgrc"), self.root) 46 self.ui.readconfig(self.join("hgrc"), self.root)
43 extensions.loadall(self.ui) 47 extensions.loadall(self.ui)
44 except IOError: 48 except IOError: