##// END OF EJS Templates
upgrade: actually use StoreEntry API to create revlog...
marmoute -
r51384:5f636e0f default
parent child Browse files
Show More
@@ -52,26 +52,15 b' def _revlog_from_store_entry(repo, entry'
52
52
53 An instance of the appropriate class is returned.
53 An instance of the appropriate class is returned.
54 """
54 """
55 rl_type = entry.revlog_type
55 if entry.revlog_type == store.FILEFLAGS_CHANGELOG:
56 path = entry.unencoded_path
57 if rl_type & store.FILEFLAGS_CHANGELOG:
58 return changelog.changelog(repo.svfs)
56 return changelog.changelog(repo.svfs)
59 elif rl_type & store.FILEFLAGS_MANIFESTLOG:
57 elif entry.revlog_type == store.FILEFLAGS_MANIFESTLOG:
60 mandir = b''
58 mandir = entry.target_id.rstrip(b'/')
61 if b'/' in path:
62 mandir = path.rsplit(b'/', 1)[0]
63 return manifest.manifestrevlog(
59 return manifest.manifestrevlog(
64 repo.nodeconstants, repo.svfs, tree=mandir
60 repo.nodeconstants, repo.svfs, tree=mandir
65 )
61 )
66 else:
62 else:
67 # drop the extension and the `data/` prefix
63 return filelog.filelog(repo.svfs, entry.target_id)
68 path_part = path.rsplit(b'.', 1)[0].split(b'/', 1)
69 if len(path_part) < 2:
70 msg = _(b'cannot recognize revlog from filename: %s')
71 msg %= path
72 raise error.Abort(msg)
73 path = path_part[1]
74 return filelog.filelog(repo.svfs, path)
75
64
76
65
77 def _copyrevlog(tr, destrepo, oldrl, entry):
66 def _copyrevlog(tr, destrepo, oldrl, entry):
General Comments 0
You need to be logged in to leave comments. Login now