508 decoded cause an exception. When it is provided, it should |
508 decoded cause an exception. When it is provided, it should |
509 be a list and the filenames that can't be decoded are added |
509 be a list and the filenames that can't be decoded are added |
510 to it instead. This is very rarely needed.""" |
510 to it instead. This is very rarely needed.""" |
511 files = self._walk(b'data', True) + self._walk(b'meta', True) |
511 files = self._walk(b'data', True) + self._walk(b'meta', True) |
512 for (t, u, s) in files: |
512 for (t, u, s) in files: |
513 yield (FILEFLAGS_FILELOG | t, u, s) |
513 if t is not None: |
|
514 yield (FILEFLAGS_FILELOG | t, u, s) |
514 |
515 |
515 def topfiles(self): |
516 def topfiles(self): |
516 # yield manifest before changelog |
517 # yield manifest before changelog |
517 files = reversed(self._walk(b'', False)) |
518 files = reversed(self._walk(b'', False)) |
518 for (t, u, s) in files: |
519 for (t, u, s) in files: |
788 def datafiles(self, matcher=None, undecodable=None): |
789 def datafiles(self, matcher=None, undecodable=None): |
789 for f in sorted(self.fncache): |
790 for f in sorted(self.fncache): |
790 if not _matchtrackedpath(f, matcher): |
791 if not _matchtrackedpath(f, matcher): |
791 continue |
792 continue |
792 ef = self.encode(f) |
793 ef = self.encode(f) |
|
794 t = revlog_type(f) |
|
795 if t is None: |
|
796 # Note: this should not be in the fncache then… |
|
797 # |
|
798 # However the fncache might contains such file added by |
|
799 # previous version of Mercurial. |
|
800 continue |
|
801 t |= FILEFLAGS_FILELOG |
793 try: |
802 try: |
794 t = revlog_type(f) |
|
795 assert t is not None, f |
|
796 t |= FILEFLAGS_FILELOG |
|
797 yield t, f, self.getsize(ef) |
803 yield t, f, self.getsize(ef) |
798 except FileNotFoundError: |
804 except FileNotFoundError: |
799 pass |
805 pass |
800 |
806 |
801 def copylist(self): |
807 def copylist(self): |