comparison mercurial/context.py @ 33035:daccadd75760

py3: define __bytes__ for basefilectx class The implementation is shamely copied from the __str__ function
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 22 Jun 2017 03:22:30 +0530
parents 582080a4a812
children ce96efec8112
comparison
equal deleted inserted replaced
33034:071732d9c210 33035:daccadd75760
709 return False 709 return False
710 710
711 __bool__ = __nonzero__ 711 __bool__ = __nonzero__
712 712
713 def __str__(self): 713 def __str__(self):
714 try:
715 return "%s@%s" % (self.path(), self._changectx)
716 except error.LookupError:
717 return "%s@???" % self.path()
718
719 def __bytes__(self):
714 try: 720 try:
715 return "%s@%s" % (self.path(), self._changectx) 721 return "%s@%s" % (self.path(), self._changectx)
716 except error.LookupError: 722 except error.LookupError:
717 return "%s@???" % self.path() 723 return "%s@???" % self.path()
718 724