663 # Otherwise assume it belongs to the simple store. |
663 # Otherwise assume it belongs to the simple store. |
664 return True |
664 return True |
665 |
665 |
666 |
666 |
667 class simplestore(store.encodedstore): |
667 class simplestore(store.encodedstore): |
668 def datafiles(self): |
668 def datafiles(self, undecodable=None): |
669 for x in super(simplestore, self).datafiles(): |
669 for x in super(simplestore, self).datafiles(): |
670 yield x |
670 yield x |
671 |
671 |
672 # Supplement with non-revlog files. |
672 # Supplement with non-revlog files. |
673 extrafiles = self._walk('data', True, filefilter=issimplestorefile) |
673 extrafiles = self._walk('data', True, filefilter=issimplestorefile) |
674 |
674 |
675 for unencoded, encoded, size in extrafiles: |
675 for f1, size in extrafiles: |
676 try: |
676 try: |
677 unencoded = store.decodefilename(unencoded) |
677 f2 = store.decodefilename(f1) |
678 except KeyError: |
678 except KeyError: |
679 unencoded = None |
679 if undecodable is None: |
680 |
680 raise error.StorageError(b'undecodable revlog name %s' % f1) |
681 yield unencoded, encoded, size |
681 else: |
|
682 undecodable.append(f1) |
|
683 continue |
|
684 |
|
685 yield f2, size |
682 |
686 |
683 |
687 |
684 def reposetup(ui, repo): |
688 def reposetup(ui, repo): |
685 if not repo.local(): |
689 if not repo.local(): |
686 return |
690 return |