Patchwork D8592: filemerge: add __bytes__ for absentfilectx

login
register
mail settings
Submitter phabricator
Date May 28, 2020, 8:26 p.m.
Message ID <differential-rev-PHID-DREV-ldmvfjfofcnalcvbfb57-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46385/
State Superseded
Headers show

Comments

phabricator - May 28, 2020, 8:26 p.m.
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This will at _least_ aid some upcoming debugging.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS




To: durin42, #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
@@ -98,6 +98,9 @@ 
         self._ctx = ctx
         self._f = f
 
+    def __bytes__(self):
+        return b'absent file %s@%s' % (self._f, self._ctx)
+
     def path(self):
         return self._f