mercurial/subrepo.py
changeset 12166 441a74b8def1
parent 12162 af8c4929931c
child 12167 d2c5b0927c28
equal deleted inserted replaced
12165:b7fbf24c8a93 12166:441a74b8def1
   244         This may be a no-op on some systems.
   244         This may be a no-op on some systems.
   245         """
   245         """
   246         raise NotImplementedError
   246         raise NotImplementedError
   247 
   247 
   248 
   248 
       
   249     def status(self, rev2, **opts):
       
   250         return [], [], [], [], [], [], []
       
   251 
   249 class hgsubrepo(abstractsubrepo):
   252 class hgsubrepo(abstractsubrepo):
   250     def __init__(self, ctx, path, state):
   253     def __init__(self, ctx, path, state):
   251         self._path = path
   254         self._path = path
   252         self._state = state
   255         self._state = state
   253         r = ctx._repo
   256         r = ctx._repo
   272             defpushpath = _abssource(self._repo, True)
   275             defpushpath = _abssource(self._repo, True)
   273             addpathconfig('default', defpath)
   276             addpathconfig('default', defpath)
   274             if defpath != defpushpath:
   277             if defpath != defpushpath:
   275                 addpathconfig('default-push', defpushpath)
   278                 addpathconfig('default-push', defpushpath)
   276             fp.close()
   279             fp.close()
       
   280 
       
   281     def status(self, rev2, **opts):
       
   282         try:
       
   283             rev1 = self._state[1]
       
   284             ctx1 = self._repo[rev1]
       
   285             ctx2 = self._repo[rev2]
       
   286             return self._repo.status(ctx1, ctx2, **opts)
       
   287         except error.RepoLookupError, inst:
       
   288             self._repo.ui.warn(_("warning: %s in %s\n")
       
   289                                % (inst, relpath(self)))
       
   290             return [], [], [], [], [], [], []
   277 
   291 
   278     def dirty(self):
   292     def dirty(self):
   279         r = self._state[1]
   293         r = self._state[1]
   280         if r == '':
   294         if r == '':
   281             return True
   295             return True