comparison mercurial/revlogutils/rewrite.py @ 51089:9c8df10ea6e0

revlog: move the `_chunk` method on the inner object This is a necessary step before being able to move more logic around restoring a revision content there. For now, we do a simple patch for the perf extension logic, when the implementation of the inner object changes, we will likely need some evolution of the API. However this is true of many things in the perf extension. So we will see this later.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 19 Oct 2023 02:57:05 +0200
parents df50a1592e0c
children 3e2a878fb96f
comparison
equal deleted inserted replaced
51088:a82704902db8 51089:9c8df10ea6e0
107 m = _( 107 m = _(
108 b'cannot censor due to censored ' 108 b'cannot censor due to censored '
109 b'revision having delta stored' 109 b'revision having delta stored'
110 ) 110 )
111 raise error.Abort(m) 111 raise error.Abort(m)
112 rawtext = rl._chunk(rev) 112 rawtext = rl._inner._chunk(rev)
113 else: 113 else:
114 rawtext = rl.rawdata(rev) 114 rawtext = rl.rawdata(rev)
115 115
116 newrl.addrawrevision( 116 newrl.addrawrevision(
117 rawtext, tr, rl.linkrev(rev), p1, p2, node, rl.flags(rev) 117 rawtext, tr, rl.linkrev(rev), p1, p2, node, rl.flags(rev)