mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
histedit: use overlayfilectx
Summary: Resend of https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097695.html Like the previous patch, this simplifies the code, and could make things faster for mode-only changes. Reviewed By: DurhamG Differential Revision: D8986781 fbshipit-source-id: 993a97ade9a41627735a65919de9ab52b600a180
This commit is contained in:
parent
e9a9857678
commit
817968c8f8
@ -635,17 +635,7 @@ def collapse(repo, first, last, commitopts, skipprompt=False):
|
||||
def filectxfn(repo, ctx, path):
|
||||
if path in headmf:
|
||||
fctx = last[path]
|
||||
flags = fctx.flags()
|
||||
mctx = context.memfilectx(
|
||||
repo,
|
||||
ctx,
|
||||
fctx.path(),
|
||||
fctx.data(),
|
||||
islink="l" in flags,
|
||||
isexec="x" in flags,
|
||||
copied=copied.get(path),
|
||||
)
|
||||
return mctx
|
||||
return context.overlayfilectx(fctx, ctx=ctx, copied=copied.get(path, False))
|
||||
return None
|
||||
|
||||
if commitopts.get("message"):
|
||||
|
Loading…
Reference in New Issue
Block a user