Mercurial > public > mercurial-scm > hg-stable
diff mercurial/mergestate.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 | ecf6d7aa874b |
children | 89a2afe31e82 |
line wrap: on
line diff
--- a/mercurial/mergestate.py Tue Oct 06 19:11:34 2020 +0530 +++ b/mercurial/mergestate.py Sat Oct 10 12:43:04 2020 +0530 @@ -306,7 +306,12 @@ ): yield f + def allextras(self): + """ return all extras information stored with the mergestate """ + return self._stateextras + def extras(self, filename): + """ return extras stored with the mergestate for the given filename """ return self._stateextras[filename] def _resolve(self, preresolve, dfile, wctx):