comparison mercurial/debugcommands.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 d2e1dcd4490d
children 07b0a687c01a b7b8a1538161
comparison
equal deleted inserted replaced
45714:ecf6d7aa874b 45715:0428978bca22
2105 fm_extras.end() 2105 fm_extras.end()
2106 2106
2107 fm_files.end() 2107 fm_files.end()
2108 2108
2109 fm_extras = fm.nested(b'extras') 2109 fm_extras = fm.nested(b'extras')
2110 for f, d in sorted(pycompat.iteritems(ms._stateextras)): 2110 for f, d in sorted(pycompat.iteritems(ms.allextras())):
2111 if f in ms: 2111 if f in ms:
2112 # If file is in mergestate, we have already processed it's extras 2112 # If file is in mergestate, we have already processed it's extras
2113 continue 2113 continue
2114 for k, v in pycompat.iteritems(d): 2114 for k, v in pycompat.iteritems(d):
2115 fm_extras.startitem() 2115 fm_extras.startitem()