# HG changeset patch # User Jason R. Coombs # Date 2022-08-29 18:11:26 # Node ID 636cd96806a7ec27c5310510a8016a888a37b538 # Parent 18282cf18aa2817e57c9648c8f2d9a563d1fa9cd shelve: add Shelf.changed_files for resolving changed files in a plugin diff --git a/mercurial/shelve.py b/mercurial/shelve.py --- a/mercurial/shelve.py +++ b/mercurial/shelve.py @@ -247,6 +247,14 @@ class Shelf: for ext in shelvefileextensions: self.vfs.tryunlink(self.name + b'.' + ext) + def changed_files(self, ui, repo): + try: + ctx = repo.unfiltered()[self.readinfo()[b'node']] + return ctx.files() + except (FileNotFoundError, error.RepoLookupError): + filename = self.vfs.join(self.name + b'.patch') + return patch.changedfiles(ui, repo, filename) + def _optimized_match(repo, node): """