comparison mercurial/changelog.py @ 9677:0c072e63e3e7

changelog: do not use a mutable default value
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 31 Oct 2009 16:49:27 +0100
parents e6162b854ed5
children 25e572394f5c
comparison
equal deleted inserted replaced
9676:48bf28d3c8dd 9677:0c072e63e3e7
196 extra['branch'] = 'default' 196 extra['branch'] = 'default'
197 files = l[3:] 197 files = l[3:]
198 return (manifest, user, (time, timezone), files, desc, extra) 198 return (manifest, user, (time, timezone), files, desc, extra)
199 199
200 def add(self, manifest, files, desc, transaction, p1, p2, 200 def add(self, manifest, files, desc, transaction, p1, p2,
201 user, date=None, extra={}): 201 user, date=None, extra=None):
202 user = user.strip() 202 user = user.strip()
203 # An empty username or a username with a "\n" will make the 203 # An empty username or a username with a "\n" will make the
204 # revision text contain two "\n\n" sequences -> corrupt 204 # revision text contain two "\n\n" sequences -> corrupt
205 # repository since read cannot unpack the revision. 205 # repository since read cannot unpack the revision.
206 if not user: 206 if not user: