From 226e1d6442767b700c8be3bd124d2557ea68674d Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Thu, 15 May 2025 12:10:39 +0300 Subject: [PATCH] tools: let cmd/tools/vpm/install_test.v use a .hg/hgrc file too --- cmd/tools/vpm/install_test.v | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/tools/vpm/install_test.v b/cmd/tools/vpm/install_test.v index 055c0007f5..ba9e39a618 100644 --- a/cmd/tools/vpm/install_test.v +++ b/cmd/tools/vpm/install_test.v @@ -177,6 +177,12 @@ fn test_install_from_hg_url() ! { } // Initialize project without manifest file. mut res := cmd_ok(@LOCATION, 'hg init ${test_module_path}') + + println('> writing .hg/hgrc to the new mercurial repo ...') + os.mkdir_all(os.join_path(test_module_path, '.hg'))! + os.write_file(os.join_path(test_module_path, '.hg/hgrc'), '[ui]\nusername = v_ci \nverbose = False\n')! + println('> writing .hg/hgrc done.') + mut p, mut port := test_utils.hg_serve(hg_path, test_module_path) // Trying to install it should fail. res = os.execute('${vexe} install --hg http://127.0.0.1:${port}') @@ -191,7 +197,7 @@ fn test_install_from_hg_url() ! { }")! os.chdir(test_module_path)! cmd_ok(@LOCATION, 'hg add') - cmd_ok(@LOCATION, 'hg --config ui.username=v_ci commit -m "add v.mod"') + cmd_ok(@LOCATION, 'hg commit -m "add v.mod"') p, port = test_utils.hg_serve(hg_path, test_module_path) // Trying to install the module should work now. res = cmd_ok(@LOCATION, '${vexe} install --hg http://127.0.0.1:${port}')