mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
commit: remove a mutable default argument
Mutable default arguments are know to the state of California to cause bugs.
This commit is contained in:
parent
0edaba580a
commit
b866453be7
@ -1378,13 +1378,15 @@ class localrepository(object):
|
||||
|
||||
@unfilteredmethod
|
||||
def commit(self, text="", user=None, date=None, match=None, force=False,
|
||||
editor=False, extra={}):
|
||||
editor=False, extra=None):
|
||||
"""Add a new revision to current repository.
|
||||
|
||||
Revision information is gathered from the working directory,
|
||||
match can be used to filter the committed files. If editor is
|
||||
supplied, it is called to get a commit message.
|
||||
"""
|
||||
if extra is None:
|
||||
extra = {}
|
||||
|
||||
def fail(f, msg):
|
||||
raise util.Abort('%s: %s' % (f, msg))
|
||||
|
Loading…
Reference in New Issue
Block a user