diff tests/test-clone.t @ 30559:d83ca854fa21

ui: factor out ui.load() to create a ui without loading configs (API) This allows us to write doctests depending on a ui object, but not on global configs. ui.load() is a class method so we can do wsgiui.load(). All ui() calls but for doctests are replaced with ui.load(). Some of them could be changed to not load configs later.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 22 Oct 2016 14:35:10 +0900
parents 6a672c3b7860
children 636cf3f7620d
line wrap: on
line diff
--- a/tests/test-clone.t	Wed Nov 30 19:23:04 2016 +0000
+++ b/tests/test-clone.t	Sat Oct 22 14:35:10 2016 +0900
@@ -515,7 +515,7 @@
 
   $ cat <<EOF > simpleclone.py
   > from mercurial import ui, hg
-  > myui = ui.ui()
+  > myui = ui.ui.load()
   > repo = hg.repository(myui, 'a')
   > hg.clone(myui, {}, repo, dest="ua")
   > EOF
@@ -528,7 +528,7 @@
 
   $ cat <<EOF > branchclone.py
   > from mercurial import ui, hg, extensions
-  > myui = ui.ui()
+  > myui = ui.ui.load()
   > extensions.loadall(myui)
   > repo = hg.repository(myui, 'a')
   > hg.clone(myui, {}, repo, dest="ua", branch=["stable",])