comparison mercurial/context.py @ 44916:61719b9658b1

merge with stable
author Yuya Nishihara <yuya@tcha.org>
date Wed, 03 Jun 2020 19:20:18 +0900
parents e607099d8b93 4234c9af515d
children b2e5ec0c596b
comparison
equal deleted inserted replaced
44905:f330d6117a5b 44916:61719b9658b1
1463 return False 1463 return False
1464 1464
1465 def children(self): 1465 def children(self):
1466 return [] 1466 return []
1467 1467
1468 def flags(self, path):
1469 if '_manifest' in self.__dict__:
1470 try:
1471 return self._manifest.flags(path)
1472 except KeyError:
1473 return b''
1474
1475 try:
1476 return self._flagfunc(path)
1477 except OSError:
1478 return b''
1479
1468 def ancestor(self, c2): 1480 def ancestor(self, c2):
1469 """return the "best" ancestor context of self and c2""" 1481 """return the "best" ancestor context of self and c2"""
1470 return self._parents[0].ancestor(c2) # punt on two parents for now 1482 return self._parents[0].ancestor(c2) # punt on two parents for now
1471 1483
1472 def ancestors(self): 1484 def ancestors(self):
1599 @propertycache 1611 @propertycache
1600 def _flagfunc(self): 1612 def _flagfunc(self):
1601 return self._repo.dirstate.flagfunc(self._buildflagfunc) 1613 return self._repo.dirstate.flagfunc(self._buildflagfunc)
1602 1614
1603 def flags(self, path): 1615 def flags(self, path):
1604 if '_manifest' in self.__dict__:
1605 try:
1606 return self._manifest.flags(path)
1607 except KeyError:
1608 return b''
1609
1610 try: 1616 try:
1611 return self._flagfunc(path) 1617 return self._flagfunc(path)
1612 except OSError: 1618 except OSError:
1613 return b'' 1619 return b''
1614 1620