diff hgsubversion/svncommands.py @ 1265:4744b7bfa476

layouts: change constructor to take a meta object This change is another step forward to centralize subversion configuration options and help refactor. I couldn't find an easier way to split up this change since there are many interdependent function calls. There is no functionality change in this patch, only renaming ui -> meta.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:49 -0500
parents 199933008ab5
children 5ee3e5030a35
line wrap: on
line diff
--- a/hgsubversion/svncommands.py
+++ b/hgsubversion/svncommands.py
@@ -189,11 +189,11 @@ def _buildmeta(ui, repo, args, partial=F
 
         if layout is None:
             layout = layouts.detect.layout_from_commit(subdir, revpath,
-                                                       ctx.branch(), ui)
-            existing_layout = layouts.detect.layout_from_file(meta.metapath)
+                                                       ctx.branch(), meta)
+            existing_layout = layouts.detect.layout_from_file(meta)
             if layout != existing_layout:
                 util.dump(layout, meta.layout_file)
-            layoutobj = layouts.layout_from_name(layout, ui)
+            layoutobj = layouts.layout_from_name(layout, meta)
         elif layout == 'single':
             assert (subdir or '/') == revpath, ('Possible layout detection'
                                                 ' defect in replay')