mercurial/subrepo.py
changeset 52452 9d79ffeed7c0
parent 51859 f4733654f144
child 52605 35cc15fbc523
equal deleted inserted replaced
52451:f5d134e57f51 52452:9d79ffeed7c0
    37     scmutil,
    37     scmutil,
    38     subrepoutil,
    38     subrepoutil,
    39     util,
    39     util,
    40     vfs as vfsmod,
    40     vfs as vfsmod,
    41 )
    41 )
       
    42 from .interfaces import (
       
    43     status as istatus,
       
    44 )
    42 from .utils import (
    45 from .utils import (
    43     dateutil,
    46     dateutil,
    44     hashutil,
    47     hashutil,
    45     procutil,
    48     procutil,
    46     urlutil,
    49     urlutil,
   330         return 1
   333         return 1
   331 
   334 
   332     def cat(self, match, fm, fntemplate, prefix, **opts):
   335     def cat(self, match, fm, fntemplate, prefix, **opts):
   333         return 1
   336         return 1
   334 
   337 
   335     def status(self, rev2, **opts):
   338     def status(self, rev2, **opts) -> istatus.Status:
   336         return scmutil.status([], [], [], [], [], [], [])
   339         return scmutil.status([], [], [], [], [], [], [])
   337 
   340 
   338     def diff(self, ui, diffopts, node2, match, prefix, **opts):
   341     def diff(self, ui, diffopts, node2, match, prefix, **opts):
   339         pass
   342         pass
   340 
   343 
   612         return cmdutil.cat(
   615         return cmdutil.cat(
   613             self.ui, self._repo, ctx, match, fm, fntemplate, prefix, **opts
   616             self.ui, self._repo, ctx, match, fm, fntemplate, prefix, **opts
   614         )
   617         )
   615 
   618 
   616     @annotatesubrepoerror
   619     @annotatesubrepoerror
   617     def status(self, rev2, **opts):
   620     def status(self, rev2, **opts) -> istatus.Status:
   618         try:
   621         try:
   619             rev1 = self._state[1]
   622             rev1 = self._state[1]
   620             ctx1 = self._repo[rev1]
   623             ctx1 = self._repo[rev1]
   621             ctx2 = self._repo[rev2]
   624             ctx2 = self._repo[rev2]
   622             return self._repo.status(ctx1, ctx2, **opts)
   625             return self._repo.status(ctx1, ctx2, **opts)
  1969             fp.write(output)
  1972             fp.write(output)
  1970             fp.close()
  1973             fp.close()
  1971         return 0
  1974         return 0
  1972 
  1975 
  1973     @annotatesubrepoerror
  1976     @annotatesubrepoerror
  1974     def status(self, rev2, **opts):
  1977     def status(self, rev2, **opts) -> istatus.Status:
  1975         rev1 = self._state[1]
  1978         rev1 = self._state[1]
  1976         if self._gitmissing() or not rev1:
  1979         if self._gitmissing() or not rev1:
  1977             # if the repo is missing, return no results
  1980             # if the repo is missing, return no results
  1978             return scmutil.status([], [], [], [], [], [], [])
  1981             return scmutil.status([], [], [], [], [], [], [])
  1979         modified, added, removed = [], [], []
  1982         modified, added, removed = [], [], []