mercurial/phases.py
changeset 23878 37a92908a382
parent 23631 b8260abfeb7d
child 24444 27e3ba73fbb1
equal deleted inserted replaced
23877:7cc77030c557 23878:37a92908a382
   131                 f = repo.svfs('phaseroots.pending')
   131                 f = repo.svfs('phaseroots.pending')
   132             except IOError, inst:
   132             except IOError, inst:
   133                 if inst.errno != errno.ENOENT:
   133                 if inst.errno != errno.ENOENT:
   134                     raise
   134                     raise
   135         if f is None:
   135         if f is None:
   136             f = repo.sopener('phaseroots')
   136             f = repo.svfs('phaseroots')
   137         try:
   137         try:
   138             for line in f:
   138             for line in f:
   139                 phase, nh = line.split()
   139                 phase, nh = line.split()
   140                 roots[int(phase)].add(bin(nh))
   140                 roots[int(phase)].add(bin(nh))
   141         finally:
   141         finally:
   154         if _load:
   154         if _load:
   155             # Cheap trick to allow shallow-copy without copy module
   155             # Cheap trick to allow shallow-copy without copy module
   156             self.phaseroots, self.dirty = _readroots(repo, phasedefaults)
   156             self.phaseroots, self.dirty = _readroots(repo, phasedefaults)
   157             self._phaserevs = None
   157             self._phaserevs = None
   158             self.filterunknown(repo)
   158             self.filterunknown(repo)
   159             self.opener = repo.sopener
   159             self.opener = repo.svfs
   160 
   160 
   161     def copy(self):
   161     def copy(self):
   162         # Shallow copy meant to ensure isolation in
   162         # Shallow copy meant to ensure isolation in
   163         # advance/retractboundary(), nothing more.
   163         # advance/retractboundary(), nothing more.
   164         ph = self.__class__(None, None, _load=False)
   164         ph = self.__class__(None, None, _load=False)