[PATCH] context: improve arg-checking assert

Greg Ward greg at gerg.ca
Fri Jul 3 09:44:58 CDT 2009


# HG changeset patch
# User Greg Ward <greg at gerg.ca>
# Date 1246632226 14400
# Node ID f46265d17271dc20e5547d26d86de7ac3975dc6c
# Parent  fc5737e491939f19530b6e138909df51a7f44d73
context: improve arg-checking assert.

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -199,7 +199,9 @@
 
         assert (changeid is not None
                 or fileid is not None
-                or changectx is not None)
+                or changectx is not None), \
+                ("bad args: changeid=%r, fileid=%r, changectx=%r"
+                 % (changeid, fileid, changectx))
 
         if filelog:
             self._filelog = filelog


More information about the Mercurial-devel mailing list