comparison mercurial/util.py @ 29298:82f6193ff2bc

util: add __ne__ to filestat class for consistency This is follow up for ca4065028e00, which introduced filestat class.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 03 Jun 2016 00:44:20 +0900
parents 1eff545cef52
children b501579147f1
comparison
equal deleted inserted replaced
29297:50fef8252820 29298:82f6193ff2bc
1453 try: 1453 try:
1454 return (self.stat.st_ctime == old.stat.st_ctime) 1454 return (self.stat.st_ctime == old.stat.st_ctime)
1455 except AttributeError: 1455 except AttributeError:
1456 return False 1456 return False
1457 1457
1458 def __ne__(self, other):
1459 return not self == other
1460
1458 class atomictempfile(object): 1461 class atomictempfile(object):
1459 '''writable file object that atomically updates a file 1462 '''writable file object that atomically updates a file
1460 1463
1461 All writes will go to a temporary copy of the original file. Call 1464 All writes will go to a temporary copy of the original file. Call
1462 close() when you are done writing, and atomictempfile will rename 1465 close() when you are done writing, and atomictempfile will rename