Mercurial > public > mercurial-scm > hg
comparison mercurial/verify.py @ 47357:fde1df74d73d
verify: use some intermediate variables instead of a multi-liner
This is shorter and easier to read as the indentation remains the same.
Differential Revision: https://phab.mercurial-scm.org/D10809
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 01 Jun 2021 09:01:23 +0200 |
parents | a3c3924ccc7f |
children | ba8a9fbed897 |
comparison
equal
deleted
inserted
replaced
47356:a3c3924ccc7f | 47357:fde1df74d73d |
---|---|
154 p1, p2 = obj.parents(node) | 154 p1, p2 = obj.parents(node) |
155 if p1 not in seen and p1 != self.repo.nullid: | 155 if p1 not in seen and p1 != self.repo.nullid: |
156 msg = _(b"unknown parent 1 %s of %s") % (short(p1), short(node)) | 156 msg = _(b"unknown parent 1 %s of %s") % (short(p1), short(node)) |
157 self._err(lr, msg, f) | 157 self._err(lr, msg, f) |
158 if p2 not in seen and p2 != self.repo.nullid: | 158 if p2 not in seen and p2 != self.repo.nullid: |
159 self._err( | 159 msg = _(b"unknown parent 2 %s of %s") % (short(p2), short(node)) |
160 lr, | 160 self._err(lr, msg, f) |
161 _(b"unknown parent 2 %s of %s") % (short(p2), short(node)), | |
162 f, | |
163 ) | |
164 except Exception as inst: | 161 except Exception as inst: |
165 self._exc(lr, _(b"checking parents of %s") % short(node), inst, f) | 162 self._exc(lr, _(b"checking parents of %s") % short(node), inst, f) |
166 | 163 |
167 if node in seen: | 164 if node in seen: |
168 self._err(lr, _(b"duplicate revision %d (%d)") % (i, seen[node]), f) | 165 self._err(lr, _(b"duplicate revision %d (%d)") % (i, seen[node]), f) |