Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Sat, 20 Apr 2013 13:48:54 +0100
changeset 1223 45a6eace22bf
parent 1220 757cf8d4724b (current diff)
parent 1222 01c23fd3d424 (diff)
child 1225 19fe7b202b38
Merge with stable
--- a/hgkw/keyword.py	Sat Mar 23 14:43:30 2013 +0000
+++ b/hgkw/keyword.py	Sat Apr 20 13:48:54 2013 +0100
@@ -384,7 +384,7 @@
     fn = 'demo.txt'
     tmpdir = tempfile.mkdtemp('', 'kwdemo.')
     ui.note(_('creating temporary repository at %s\n') % tmpdir)
-    repo = localrepo.localrepository(ui, tmpdir, True)
+    repo = localrepo.localrepository(repo.baseui, tmpdir, True)
     ui.setconfig('keyword', fn, '')
     svn = ui.configbool('keywordset', 'svn')
     # explicitly set keywordset for demo output
--- a/tests/run-tests.py	Sat Mar 23 14:43:30 2013 +0000
+++ b/tests/run-tests.py	Sat Apr 20 13:48:54 2013 +0100
@@ -198,6 +198,8 @@
         help="enable Py3k warnings on Python 2.6+")
     parser.add_option('--extra-config-opt', action="append",
                       help='set the given config opt in the test hgrc')
+    parser.add_option('--random', action="store_true",
+                      help='run tests in random order')
 
     for option, (envvar, default) in defaults.items():
         defaults[option] = type(default)(os.environ.get(envvar, default))
@@ -1248,6 +1250,9 @@
 
     tests = args
 
+    if options.random:
+        random.shuffle(tests)
+
     # Reset some environment variables to well-known values so that
     # the tests produce repeatable output.
     os.environ['LANG'] = os.environ['LC_ALL'] = os.environ['LANGUAGE'] = 'C'