Changeset - e885a8efef34
[Not reviewed]
default
0 1 0
Mads Kiilerich - 7 years ago 2018-09-30 18:31:37
mads@kiilerich.com
tests: fix vcs Hg helper function get_config_value to not modify global state when using a custom config file

This leak was what made test_get_user_name and test_get_user_email pass when
test_get_config_value had been run first.
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -602,8 +602,10 @@ class MercurialRepository(BaseRepository
 
            config_file = [config_file]
 

	
 
        config = self._repo.ui
 
        for path in config_file:
 
            config.readconfig(path)
 
        if config_file:
 
            config = ui.ui()
 
            for path in config_file:
 
                config.readconfig(path)
 
        return config.config(section, name)
 

	
 
    def get_user_name(self, config_file=None):
0 comments (0 inline, 0 general)