comparison mercurial/localrepo.py @ 19569:00140039bd8f

localrepo: remove unnecessary check of instance The refactoring of all the context objects allows us to simply pass a basectx to the __new__ constructor and have it return the same object without allocating new memory.
author Sean Farley <sean.michael.farley@gmail.com>
date Tue, 06 Aug 2013 15:11:42 -0500
parents 14c91b18d798
children b9b7dc267e9f
comparison
equal deleted inserted replaced
19568:f58235d85d6b 19569:00140039bd8f
1455 for fn in mf.keys(): 1455 for fn in mf.keys():
1456 if not match(fn): 1456 if not match(fn):
1457 del mf[fn] 1457 del mf[fn]
1458 return mf 1458 return mf
1459 1459
1460 if isinstance(node1, context.changectx): 1460 ctx1 = self[node1]
1461 ctx1 = node1 1461 ctx2 = self[node2]
1462 else:
1463 ctx1 = self[node1]
1464 if isinstance(node2, context.changectx):
1465 ctx2 = node2
1466 else:
1467 ctx2 = self[node2]
1468 1462
1469 working = ctx2.rev() is None 1463 working = ctx2.rev() is None
1470 parentworking = working and ctx1 == self['.'] 1464 parentworking = working and ctx1 == self['.']
1471 match = match or matchmod.always(self.root, self.getcwd()) 1465 match = match or matchmod.always(self.root, self.getcwd())
1472 listignored, listclean, listunknown = ignored, clean, unknown 1466 listignored, listclean, listunknown = ignored, clean, unknown