mercurial/context.py
branchstable
changeset 44912 4234c9af515d
parent 44365 7c4b98a4e536
child 44916 61719b9658b1
equal deleted inserted replaced
44911:84614212ae39 44912:4234c9af515d
  1456         return False
  1456         return False
  1457 
  1457 
  1458     def children(self):
  1458     def children(self):
  1459         return []
  1459         return []
  1460 
  1460 
       
  1461     def flags(self, path):
       
  1462         if '_manifest' in self.__dict__:
       
  1463             try:
       
  1464                 return self._manifest.flags(path)
       
  1465             except KeyError:
       
  1466                 return b''
       
  1467 
       
  1468         try:
       
  1469             return self._flagfunc(path)
       
  1470         except OSError:
       
  1471             return b''
       
  1472 
  1461     def ancestor(self, c2):
  1473     def ancestor(self, c2):
  1462         """return the "best" ancestor context of self and c2"""
  1474         """return the "best" ancestor context of self and c2"""
  1463         return self._parents[0].ancestor(c2)  # punt on two parents for now
  1475         return self._parents[0].ancestor(c2)  # punt on two parents for now
  1464 
  1476 
  1465     def ancestors(self):
  1477     def ancestors(self):
  1592     @propertycache
  1604     @propertycache
  1593     def _flagfunc(self):
  1605     def _flagfunc(self):
  1594         return self._repo.dirstate.flagfunc(self._buildflagfunc)
  1606         return self._repo.dirstate.flagfunc(self._buildflagfunc)
  1595 
  1607 
  1596     def flags(self, path):
  1608     def flags(self, path):
  1597         if '_manifest' in self.__dict__:
       
  1598             try:
       
  1599                 return self._manifest.flags(path)
       
  1600             except KeyError:
       
  1601                 return b''
       
  1602 
       
  1603         try:
  1609         try:
  1604             return self._flagfunc(path)
  1610             return self._flagfunc(path)
  1605         except OSError:
  1611         except OSError:
  1606             return b''
  1612             return b''
  1607 
  1613