filelog: show the passed argument on error
The error now do more than stating what it need. It also state what it got.
--- 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)