diff hgsubversion/layouts/__init__.py @ 1024:8feff33e387d

layouts: make ui object available to layout instances
author David Schleimer <dschleimer@fb.com>
date Tue, 21 May 2013 15:49:07 -0700
parents e8cd211684c4
children cd0d14e25757
line wrap: on
line diff
--- a/hgsubversion/layouts/__init__.py
+++ b/hgsubversion/layouts/__init__.py
@@ -31,7 +31,7 @@ NAME_TO_CLASS = {
 }
 
 
-def layout_from_name(name):
+def layout_from_name(name, ui):
     """Returns a layout module given the layout name
 
     You should use one of the layout.detect.* functions to get the
@@ -41,4 +41,4 @@ def layout_from_name(name):
 
     if name not in NAME_TO_CLASS:
         raise hgutil.Abort('Unknown hgsubversion layout: %s' %name)
-    return NAME_TO_CLASS[name]()
+    return NAME_TO_CLASS[name](ui)