mercurial/exchange.py
changeset 48549 28f0092ec89f
parent 48526 04688c51f81f
child 48875 6000f5b25c9b
equal deleted inserted replaced
48548:88a45330b290 48549:28f0092ec89f
   519         step(pushop)
   519         step(pushop)
   520 
   520 
   521 
   521 
   522 def _checksubrepostate(pushop):
   522 def _checksubrepostate(pushop):
   523     """Ensure all outgoing referenced subrepo revisions are present locally"""
   523     """Ensure all outgoing referenced subrepo revisions are present locally"""
       
   524 
       
   525     repo = pushop.repo
       
   526 
       
   527     # If the repository does not use subrepos, skip the expensive
       
   528     # manifest checks.
       
   529     if not len(repo.file(b'.hgsub')) or not len(repo.file(b'.hgsubstate')):
       
   530         return
       
   531 
   524     for n in pushop.outgoing.missing:
   532     for n in pushop.outgoing.missing:
   525         ctx = pushop.repo[n]
   533         ctx = repo[n]
   526 
   534 
   527         if b'.hgsub' in ctx.manifest() and b'.hgsubstate' in ctx.files():
   535         if b'.hgsub' in ctx.manifest() and b'.hgsubstate' in ctx.files():
   528             for subpath in sorted(ctx.substate):
   536             for subpath in sorted(ctx.substate):
   529                 sub = ctx.sub(subpath)
   537                 sub = ctx.sub(subpath)
   530                 sub.verify(onpush=True)
   538                 sub.verify(onpush=True)