equal
deleted
inserted
replaced
2275 def _temprevlog(ui, orig, truncaterev): |
2275 def _temprevlog(ui, orig, truncaterev): |
2276 from mercurial import vfs as vfsmod |
2276 from mercurial import vfs as vfsmod |
2277 |
2277 |
2278 if orig._inline: |
2278 if orig._inline: |
2279 raise error.Abort('not supporting inline revlog (yet)') |
2279 raise error.Abort('not supporting inline revlog (yet)') |
|
2280 revlogkwargs = {} |
|
2281 k = 'upperboundcomp' |
|
2282 if util.safehasattr(orig, k): |
|
2283 revlogkwargs[k] = getattr(orig, k) |
2280 |
2284 |
2281 origindexpath = orig.opener.join(orig.indexfile) |
2285 origindexpath = orig.opener.join(orig.indexfile) |
2282 origdatapath = orig.opener.join(orig.datafile) |
2286 origdatapath = orig.opener.join(orig.datafile) |
2283 indexname = 'revlog.i' |
2287 indexname = 'revlog.i' |
2284 dataname = 'revlog.d' |
2288 dataname = 'revlog.d' |
2306 vfs = vfsmod.vfs(tmpdir) |
2310 vfs = vfsmod.vfs(tmpdir) |
2307 vfs.options = getattr(orig.opener, 'options', None) |
2311 vfs.options = getattr(orig.opener, 'options', None) |
2308 |
2312 |
2309 dest = revlog.revlog(vfs, |
2313 dest = revlog.revlog(vfs, |
2310 indexfile=indexname, |
2314 indexfile=indexname, |
2311 datafile=dataname) |
2315 datafile=dataname, **revlogkwargs) |
2312 if dest._inline: |
2316 if dest._inline: |
2313 raise error.Abort('not supporting inline revlog (yet)') |
2317 raise error.Abort('not supporting inline revlog (yet)') |
2314 # make sure internals are initialized |
2318 # make sure internals are initialized |
2315 dest.revision(len(dest) - 1) |
2319 dest.revision(len(dest) - 1) |
2316 yield dest |
2320 yield dest |