Mercurial > hg
comparison mercurial/store.py @ 50628:3ea3767c23a4
store: do not drop the final `/` when creating manifestlog instance
This bug, inherited from the upgrade code leads to the acces/creation of broken
revlog with name `DIRECTORY00manifest.i` instead of `DIRECTORY/00manifest.i`
We fix it in its own changeset to preserve the "pure code movement" aspect of
the previous changesets.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 29 May 2023 13:28:33 +0200 |
parents | e1ee6910f6bc |
children | 309cbd8400ae |
comparison
equal
deleted
inserted
replaced
50627:e1ee6910f6bc | 50628:3ea3767c23a4 |
---|---|
552 An instance of the appropriate class is returned. | 552 An instance of the appropriate class is returned. |
553 """ | 553 """ |
554 if self.is_changelog: | 554 if self.is_changelog: |
555 return changelog.changelog(repo.svfs) | 555 return changelog.changelog(repo.svfs) |
556 elif self.is_manifestlog: | 556 elif self.is_manifestlog: |
557 mandir = self.target_id.rstrip(b'/') | 557 mandir = self.target_id |
558 return manifest.manifestrevlog( | 558 return manifest.manifestrevlog( |
559 repo.nodeconstants, repo.svfs, tree=mandir | 559 repo.nodeconstants, repo.svfs, tree=mandir |
560 ) | 560 ) |
561 else: | 561 else: |
562 return filelog.filelog(repo.svfs, self.target_id) | 562 return filelog.filelog(repo.svfs, self.target_id) |