Patchwork D11802: filemerge: simplify slightly by using filectx.decodeddata()

login
register
mail settings
Submitter phabricator
Date Nov. 24, 2021, 5:05 p.m.
Message ID <differential-rev-PHID-DREV-2ccunmpkdsk7lrzsrbtv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50128/
State Superseded
Headers show

Comments

phabricator - Nov. 24, 2021, 5:05 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11802

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -995,7 +995,7 @@ 
 
     def tempfromcontext(prefix, ctx):
         f, name = maketempfrompath(prefix, ctx.path())
-        data = repo.wwritedata(ctx.path(), ctx.data())
+        data = ctx.decodeddata()
         f.write(data)
         f.close()
         return name