--- a/tests/test-shelve.t Mon Aug 29 14:11:26 2022 -0400
+++ b/tests/test-shelve.t Tue Aug 30 09:59:53 2022 -0400
@@ -1600,6 +1600,7 @@
$ rm -r .hg/shelve*
#if phasebased
+ $ cp $HGRCPATH $TESTTMP/hgrc-saved
$ cat <<EOF >> $HGRCPATH
> [shelve]
> store = strip
@@ -1628,3 +1629,32 @@
#if stripbased
$ hg log --hidden --template '{user}\n'
#endif
+
+clean up
+
+#if phasebased
+ $ mv $TESTTMP/hgrc-saved $HGRCPATH
+#endif
+
+changed files should be reachable in all shelves
+
+create an extension that emits changed files
+
+ $ cat > shelve-changed-files.py << EOF
+ > """Command to emit changed files for a shelf"""
+ >
+ > from mercurial import registrar, shelve
+ >
+ > cmdtable = {}
+ > command = registrar.command(cmdtable)
+ >
+ >
+ > @command(b'shelve-changed-files')
+ > def shelve_changed_files(ui, repo, name):
+ > shelf = shelve.ShelfDir(repo).get(name)
+ > for file in shelf.changed_files(ui, repo):
+ > ui.write(file + b'\n')
+ > EOF
+
+ $ hg --config extensions.shelve-changed-files=shelve-changed-files.py shelve-changed-files default
+ somefile.py