changeset 14528:0bd69e37fd20

memctx: simplify constructor
author Patrick Mezard <pmezard@gmail.com>
date Sat, 04 Jun 2011 15:20:49 +0200
parents 5867bd6e7cf5
children e7a1814854b9
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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):