Mercurial > hg
changeset 49822:1d8721be2428
dirstate: add narrow support to `verify`
This will be called later in the series by the `verify` command.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 02 May 2022 17:39:01 +0200 |
parents | 8f200511cdc7 |
children | 2715c8549f4b |
files | mercurial/dirstate.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon May 02 11:42:23 2022 +0200 +++ b/mercurial/dirstate.py Mon May 02 17:39:01 2022 +0200 @@ -1540,7 +1540,7 @@ if data_backup is not None: o.unlink(data_backup[0]) - def verify(self, m1, m2): + def verify(self, m1, m2, narrow_matcher=None): """check the dirstate content again the parent manifest and yield errors""" missing_from_p1 = b"%s in state %s, but not in manifest1\n" unexpected_in_p1 = b"%s in state %s, but also in manifest1\n" @@ -1556,6 +1556,8 @@ if entry.added and f in m1: yield (unexpected_in_p1, f, state) for f in m1: + if narrow_matcher is not None and not narrow_matcher(f): + continue entry = self.get_entry(f) if not entry.p1_tracked: yield (missing_from_ds, f, entry.state)