diff mercurial/commit.py @ 45715:0428978bca22

mergestate: add `allextras()` to get all extras `extras()` can only be used for getting extra for a file. However at couple of places in code, we wanted to iterate over all the extras stored with the mergestate and they were accessing the private `_stateextras`. We add a new function for this. Differential Revision: https://phab.mercurial-scm.org/D9190
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 10 Oct 2020 12:43:04 +0530
parents 60c46cc28bf4
children 067707e026b4 5d65e04b6a80
line wrap: on
line diff
--- a/mercurial/commit.py	Tue Oct 06 19:11:34 2020 +0530
+++ b/mercurial/commit.py	Sat Oct 10 12:43:04 2020 +0530
@@ -155,7 +155,7 @@
     copy_sd = repo.filecopiesmode == b'changeset-sidedata'
     if copy_sd and len(ctx.parents()) > 1:
         if ms.active():
-            for fname in sorted(ms._stateextras.keys()):
+            for fname in sorted(ms.allextras().keys()):
                 might_removed = ms.extras(fname).get(b'merge-removal-candidate')
                 if might_removed == b'yes':
                     if fname in ctx: