# HG changeset patch # User Martin von Zweigbergk # Date 2021-01-07 23:24:15 # Node ID 14ce2eb6e8a4ee2fef9dc3a95119d3aeccb30f8c # Parent 58ca948692872efba7e6a5337f22c988d68d6b85 shelve: open patch using new shelf class instead of open() For some reason the existing code didn't use `shelvedfile().opener()` so here we migrate to `shelf().open_patch()` from the `open()` system call instead. Differential Revision: https://phab.mercurial-scm.org/D9706 diff --git a/mercurial/shelve.py b/mercurial/shelve.py --- a/mercurial/shelve.py +++ b/mercurial/shelve.py @@ -28,7 +28,6 @@ import itertools import stat from .i18n import _ -from .pycompat import open from .node import ( bin, hex, @@ -672,7 +671,7 @@ def listcmd(ui, repo, pats, opts): ui.write(age, label=b'shelve.age') ui.write(b' ' * (12 - len(age))) used += 12 - with open(name + b'.' + patchextension, b'rb') as fp: + with Shelf(repo, sname).open_patch() as fp: while True: line = fp.readline() if not line: