comparison mercurial/dirstate.py @ 32772:7ad95626f6a7

filestat: move __init__ to frompath constructor We're going to add a `fromfp` constructor soon, and this also allows a filestat object for a non-existent file to be created.
author Siddharth Agarwal <sid0@fb.com>
date Sat, 10 Jun 2017 14:09:54 -0700
parents b698921ee137
children b7f6885cb055
comparison
equal deleted inserted replaced
32771:c82fa7efcbc8 32772:7ad95626f6a7
430 430
431 def _read(self): 431 def _read(self):
432 self._map = {} 432 self._map = {}
433 self._copymap = {} 433 self._copymap = {}
434 # ignore HG_PENDING because identity is used only for writing 434 # ignore HG_PENDING because identity is used only for writing
435 self._identity = util.filestat(self._opener.join(self._filename)) 435 self._identity = util.filestat.frompath(
436 self._opener.join(self._filename))
436 try: 437 try:
437 fp = self._opendirstatefile() 438 fp = self._opendirstatefile()
438 try: 439 try:
439 st = fp.read() 440 st = fp.read()
440 finally: 441 finally: