mercurial/subrepo.py
changeset 24778 a48b65ab428d
parent 24726 747748766421
child 24785 39f519be5e65
equal deleted inserted replaced
24777:077683371b7b 24778:a48b65ab428d
  1777 
  1777 
  1778         cmd.append(node1)
  1778         cmd.append(node1)
  1779         if node2:
  1779         if node2:
  1780             cmd.append(node2)
  1780             cmd.append(node2)
  1781 
  1781 
  1782         if match.anypats():
       
  1783             return #No support for include/exclude yet
       
  1784 
       
  1785         output = ""
  1782         output = ""
  1786         if match.always():
  1783         if match.always():
  1787             output += self._gitcommand(cmd) + '\n'
  1784             output += self._gitcommand(cmd) + '\n'
  1788         elif match.files():
  1785         else:
  1789             for f in match.files():
  1786             st = self.status(node2)[:3]
  1790                 output += self._gitcommand(cmd + [f]) + '\n'
  1787             files = [f for sublist in st for f in sublist]
  1791         elif match(gitprefix): #Subrepo is matched
  1788             for f in files:
  1792             output += self._gitcommand(cmd) + '\n'
  1789                 if match(f):
       
  1790                     output += self._gitcommand(cmd + ['--', f]) + '\n'
  1793 
  1791 
  1794         if output.strip():
  1792         if output.strip():
  1795             ui.write(output)
  1793             ui.write(output)
  1796 
  1794 
  1797     @annotatesubrepoerror
  1795     @annotatesubrepoerror