# HG changeset patch # User Patrick Mezard # Date 2011-06-04 13:20:49 # Node ID 0bd69e37fd20f43b0c2a9ae95a495637d80ef7a0 # Parent 5867bd6e7cf5eaacbb224b476c1e12f2c1cc84d1 memctx: simplify constructor diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1008,9 +1008,7 @@ class memctx(object): self._filectxfn = filectxfn self._extra = extra and extra.copy() or {} - if 'branch' not in self._extra: - self._extra['branch'] = 'default' - elif self._extra.get('branch') == '': + if self._extra.get('branch', '') == '': self._extra['branch'] = 'default' def __str__(self):