Patchwork [02,of,13] changelog: add the missing 'closed' property on 'appender' object

login
register
mail settings
Submitter Boris Feld
Date Feb. 6, 2018, 1:21 p.m.
Message ID <b9d09ad843263f81e9d5.1517923283@FB>
Download mbox | patch
Permalink /patch/27356/
State New
Headers show

Comments

Boris Feld - Feb. 6, 2018, 1:21 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1517911721 -3600
#      Tue Feb 06 11:08:41 2018 +0100
# Node ID b9d09ad843263f81e9d561d76e65671af864cc6f
# Parent  cc2e588940df0435bf0e3013ebd45013a22fa8fe
# EXP-Topic revlog-fp
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b9d09ad84326
changelog: add the missing 'closed' property on 'appender' object

This mimic file object further.

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -90,6 +90,11 @@  class appender(object):
         return self.offset
     def flush(self):
         pass
+
+    @property
+    def closed(self):
+        return self.fp.closed
+
     def close(self):
         self.fp.close()