changeset 49207:8960d8eb747b

filelog: show the passed argument on error The error now do more than stating what it need. It also state what it got.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 06 Apr 2021 03:24:26 +0200
parents b5858e02e3ba
children 675594a0a71a
files mercurial/filelog.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filelog.py	Tue Apr 06 03:23:46 2021 +0200
+++ b/mercurial/filelog.py	Tue Apr 06 03:24:26 2021 +0200
@@ -240,7 +240,9 @@
     # Used by repo upgrade.
     def clone(self, tr, destrevlog, **kwargs):
         if not isinstance(destrevlog, filelog):
-            raise error.ProgrammingError(b'expected filelog to clone()')
+            msg = b'expected filelog to clone(), not %r'
+            msg %= destrevlog
+            raise error.ProgrammingError(msg)
 
         return self._revlog.clone(tr, destrevlog._revlog, **kwargs)