changelog: removed bad default arguments in add method
authorMartin Geisler <mg@lazybytes.net>
Fri, 15 May 2009 00:55:14 +0200
changeset 8422 437e06bbd11e
parent 8421 b6d0fa8c7685
child 8427 cebdfdcc3e42
changelog: removed bad default arguments in add method The arguments defaulted to None, but - user cannot be None since it is immediately stripped. - p1 and p2 cannot be None since they are passed directly to revlog.addrevision, where they are mandatory.
mercurial/changelog.py
--- a/mercurial/changelog.py	Wed May 13 21:36:16 2009 +0200
+++ b/mercurial/changelog.py	Fri May 15 00:55:14 2009 +0200
@@ -198,9 +198,8 @@
         files = l[3:]
         return (manifest, user, (time, timezone), files, desc, extra)
 
-    def add(self, manifest, files, desc, transaction, p1=None, p2=None,
-                  user=None, date=None, extra={}):
-
+    def add(self, manifest, files, desc, transaction, p1, p2,
+                  user, date=None, extra={}):
         user = user.strip()
         if "\n" in user:
             raise error.RevlogError(_("username %s contains a newline")