memctx: simplify constructor
authorPatrick Mezard <pmezard@gmail.com>
Sat, 04 Jun 2011 15:20:49 +0200
changeset 14528 0bd69e37fd20
parent 14527 5867bd6e7cf5
child 14529 e7a1814854b9
memctx: simplify constructor
mercurial/context.py
--- a/mercurial/context.py	Fri Jun 03 15:08:08 2011 -0500
+++ b/mercurial/context.py	Sat Jun 04 15:20:49 2011 +0200
@@ -1008,9 +1008,7 @@
         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):