# HG changeset patch # User Pierre-Yves David # Date 2017-03-15 22:03:43 # Node ID 406705701c2d77a527794d40068278d07bec877a # Parent 807387581d89acedcd2cce34b2945a0a0cf28a1e rebase: explicitly tests for None Changeset 361bccce566a removed the mutable default value, but did not explicitly tested for None. Such implicit checking can introduce semantic and performance issue. We move to an explicit check for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -725,7 +725,8 @@ def _definesets(ui, repo, destf=None, sr destspace=None): """use revisions argument to define destination and rebase set """ - revf = revf or [] + if revf is None: + revf = [] # destspace is here to work around issues with `hg pull --rebase` see # issue5214 for details