mercurial/subrepo.py
changeset 25572 3d8c044ed513
parent 25416 c4a92867c048
child 25591 f1d46075b13a
equal deleted inserted replaced
25571:1abfe639a70c 25572:3d8c044ed513
   660             vfs = self._cachestorehashvfs
   660             vfs = self._cachestorehashvfs
   661             vfs.writelines(cachefile, storehash, mode='w', notindexed=True)
   661             vfs.writelines(cachefile, storehash, mode='w', notindexed=True)
   662         finally:
   662         finally:
   663             lock.release()
   663             lock.release()
   664 
   664 
       
   665     def _getctx(self):
       
   666         '''fetch the context for this subrepo revision, possibly a workingctx
       
   667         '''
       
   668         if self._ctx.rev() is None:
       
   669             return self._repo[None]  # workingctx if parent is workingctx
       
   670         else:
       
   671             rev = self._state[1]
       
   672             return self._repo[rev]
       
   673 
   665     @annotatesubrepoerror
   674     @annotatesubrepoerror
   666     def _initrepo(self, parentrepo, source, create):
   675     def _initrepo(self, parentrepo, source, create):
   667         self._repo._subparent = parentrepo
   676         self._repo._subparent = parentrepo
   668         self._repo._subsource = source
   677         self._repo._subsource = source
   669 
   678