# HG changeset patch # User Pierre-Yves David # Date 1444122246 25200 # Node ID 25a58881efdde4c5a7bcf4ec5c763749ba083334 # Parent b9be8ab6e628eada5a9a4ce55fa281bc1aa8c6bb extract: simplify parents assignement We move to the more standard style of: value = default if special: value = other This is more consistent and compact. diff -r b9be8ab6e628 -r 25a58881efdd mercurial/patch.py --- a/mercurial/patch.py Tue Oct 06 02:01:53 2015 -0700 +++ b/mercurial/patch.py Tue Oct 06 02:04:06 2015 -0700 @@ -271,15 +271,11 @@ data['branch'] = branch return data + p1 = p2 = None if parents: p1 = parents.pop(0) - else: - p1 = None - - if parents: - p2 = parents.pop(0) - else: - p2 = None + if parents: + p2 = parents.pop(0) data['filename'] = tmpname data['message'] = message