Patchwork [06,of,18,"] verify: make the `exc` method private

login
register
mail settings
Submitter Pierre-Yves David
Date March 6, 2019, 4:29 p.m.
Message ID <cfc34a3b69850c784cc5.1551889762@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39107/
State Accepted
Headers show

Comments

Pierre-Yves David - March 6, 2019, 4:29 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1551868308 -3600
#      Wed Mar 06 11:31:48 2019 +0100
# Node ID cfc34a3b69850c784cc57fbb474c1c14e0e5387e
# Parent  6c59b746e8b71df6d5f0cc02a72fedac099a2a80
# EXP-Topic verify
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r cfc34a3b6985
verify: make the `exc` method private

The method is for internal use only.

Patch

diff --git a/mercurial/verify.py b/mercurial/verify.py
--- a/mercurial/verify.py
+++ b/mercurial/verify.py
@@ -69,7 +69,7 @@  class verifier(object):
         self.ui.warn(" " + msg + "\n")
         self.errors += 1
 
-    def exc(self, linkrev, msg, inst, filename=None):
+    def _exc(self, linkrev, msg, inst, filename=None):
         """record exception raised during the verify process"""
         fmsg = pycompat.bytestr(inst)
         if not fmsg:
@@ -122,7 +122,7 @@  class verifier(object):
                 self._err(lr, _("unknown parent 2 %s of %s") %
                     (short(p2), short(node)), f)
         except Exception as inst:
-            self.exc(lr, _("checking parents of %s") % short(node), inst, f)
+            self._exc(lr, _("checking parents of %s") % short(node), inst, f)
 
         if node in seen:
             self._err(lr, _("duplicate revision %d (%d)") % (i, seen[node]), f)
@@ -195,7 +195,7 @@  class verifier(object):
                         filelinkrevs.setdefault(_normpath(f), []).append(i)
             except Exception as inst:
                 self.refersmf = True
-                self.exc(i, _("unpacking changeset %s") % short(n), inst)
+                self._exc(i, _("unpacking changeset %s") % short(n), inst)
         progress.complete()
         return mflinkrevs, filelinkrevs
 
@@ -257,7 +257,7 @@  class verifier(object):
                             continue
                         filenodes.setdefault(fullpath, {}).setdefault(fn, lr)
             except Exception as inst:
-                self.exc(lr, _("reading delta %s") % short(n), inst, label)
+                self._exc(lr, _("reading delta %s") % short(n), inst, label)
         if not dir:
             progress.complete()
 
@@ -443,7 +443,8 @@  class verifier(object):
                         else:
                             fl2.rev(rp[1])
                 except Exception as inst:
-                    self.exc(lr, _("checking rename of %s") % short(n), inst, f)
+                    self._exc(lr, _("checking rename of %s") % short(n),
+                              inst, f)
 
             # cross-check
             if f in filenodes: