Mercurial > public > mercurial-scm > hg
comparison mercurial/admin/verify.py @ 51611:2a27b921cd91 stable
admin-verify: fix error message handling
`dirstate.verify` used to return tuples but does not anymore, it returns
the pre-formatted error message, which is a nicer interface anyway.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 06 May 2024 16:16:15 +0200 |
parents | dcb00d5c397a |
children | 1c5810ce737e |
comparison
equal
deleted
inserted
replaced
51610:dcb00d5c397a | 51611:2a27b921cd91 |
---|---|
36 errors = 0 | 36 errors = 0 |
37 | 37 |
38 is_narrow = requirements.NARROW_REQUIREMENT in repo.requirements | 38 is_narrow = requirements.NARROW_REQUIREMENT in repo.requirements |
39 narrow_matcher = repo.narrowmatch() if is_narrow else None | 39 narrow_matcher = repo.narrowmatch() if is_narrow else None |
40 for err in repo.dirstate.verify(m1, m2, parent1, narrow_matcher): | 40 for err in repo.dirstate.verify(m1, m2, parent1, narrow_matcher): |
41 ui.warn(err[0] % err[1:]) | 41 ui.warn(err) |
42 errors += 1 | 42 errors += 1 |
43 | 43 |
44 return errors | 44 return errors |
45 | 45 |
46 | 46 |