From 8c3ad21f8a6fbd7c08f59e8a0f36669a47104a22 Mon Sep 17 00:00:00 2001 From: Mathieu Courtois <mathieu.courtois@edf.fr> Date: Tue, 14 Nov 2023 11:40:32 +0100 Subject: [PATCH] [#31665] fix hgrc references in messages --- lib/aslint/config.py | 8 ++++---- lib/aslint/i18n.py | 2 +- lib/hgaster/ascommands.py | 6 +++--- lib/hgaster/hooks/codeaster.py | 4 ++-- lib/hgaster/maintenance.py | 2 +- share/test/CTestTestfile.cmake | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/aslint/config.py b/lib/aslint/config.py index 04e2b3d3..5fc4cf6e 100644 --- a/lib/aslint/config.py +++ b/lib/aslint/config.py @@ -258,8 +258,8 @@ class AsterCfgSection(object): # pragma pylint: disable=R0902 elif name == "waf_prefix": value = c4che.get("PREFIX", "") elif name == "rex_write_password": - hgrc = osp.join(os.environ.get("HOME", ""), ".gitconfig") - mode = os.stat(hgrc).st_mode + gitrc = osp.join(os.environ.get("HOME", ""), ".gitconfig") + mode = os.stat(gitrc).st_mode assert not mode & stat.S_IRGRP and not mode & stat.S_IROTH, ( "Your ~/.gitconfig file must not be readable by others, " "run 'chmod 600 ~/.gitconfig'" @@ -289,11 +289,11 @@ class AsterCfgSection(object): # pragma pylint: disable=R0902 """Force initialization of required parameters""" username = self.get("username") assert username is not None, ( - "invalid username, check the [ui] " "section of your ~/.hgrc file" + "invalid username, check the [user] section of your ~/.gitconfig file" ) email = self.get("notify.user") assert email is not None, ( - "invalid email address, check the [ui] " "section of your ~/.hgrc file" + "invalid email address, check the [user] section of your ~/.gitconfig file" ) def clean(self, name): diff --git a/lib/aslint/i18n.py b/lib/aslint/i18n.py index b9d3ab78..b4657205 100644 --- a/lib/aslint/i18n.py +++ b/lib/aslint/i18n.py @@ -3,7 +3,7 @@ """Internationalization support for aslint (and for the hgaster extension too). Translation is enabled by default (if the related .mo file is found). -To disable it, add in your hg configuration (~/.hgrc ou .hg/hgrc): +To disable it, add in your hg configuration (~/.gitconfig ou .git/config): [aster] translation = false """ diff --git a/lib/hgaster/ascommands.py b/lib/hgaster/ascommands.py index a29ee49f..d800d46c 100644 --- a/lib/hgaster/ascommands.py +++ b/lib/hgaster/ascommands.py @@ -693,7 +693,7 @@ class CandidateRevisionCheckAster(CandidateRevisionCheck): "no such file: '{0}', please run '{1} configure'. " "If you are using a specific version you can " "adjust the 'waf.builddir' parameter in the [aster] " - "section of your ~/.hgrc file." + "section of your ~/.gitconfig file." ).format(wafc4che, self.get_cfg("waf.bin")) ) @@ -740,8 +740,8 @@ class AbstractSubmit(CandidateRevisionCheck): if not self.dvp: logger.error( _( - "you must fill the 'username' parameter in the " - "[ui] section of your ~/.hgrc file" + "you must fill the 'name' parameter in the " + "[user] section of your ~/.gitconfig file" ) ) self.init_queue(notify=False) diff --git a/lib/hgaster/hooks/codeaster.py b/lib/hgaster/hooks/codeaster.py index e5b779ad..8ba65425 100644 --- a/lib/hgaster/hooks/codeaster.py +++ b/lib/hgaster/hooks/codeaster.py @@ -57,7 +57,7 @@ def aslint(repopath, paths=(), amend=False): if choice == "no": logger.warn( "pre-commit checkings skipped because of 'check.precommit'" - " value in your ~/.hgrc file" + " value in your ~/.gitconfig file" ) return OK elif choice == "undef": @@ -73,7 +73,7 @@ def aslint(repopath, paths=(), amend=False): elif choice != "yes": logger.warn( "unknown choice {0!r} for 'check.precommit'" - " (see ~/.hgrc) must be 'yes' or 'no'.".format(choice) + " (see ~/.gitconfig) must be 'yes' or 'no'.".format(choice) ) dchg = get_changed_files(repopath, revs=revs, files=paths) changes = filter_dict(dchg) diff --git a/lib/hgaster/maintenance.py b/lib/hgaster/maintenance.py index 15835de9..638a10fe 100644 --- a/lib/hgaster/maintenance.py +++ b/lib/hgaster/maintenance.py @@ -225,7 +225,7 @@ class BaseMaintenance(object): "--notify-user", action="store_true", help="notify the user on completion or failure. The address " - "must be defined in [aster] section of ~/.hgrc", + "must be defined in [user] section of ~/.gitconfig", ) group.add_option( "--notify-admins", diff --git a/share/test/CTestTestfile.cmake b/share/test/CTestTestfile.cmake index fe5210a1..0a40fc9a 100644 --- a/share/test/CTestTestfile.cmake +++ b/share/test/CTestTestfile.cmake @@ -1,6 +1,6 @@ # -------------------------------------------------------------------- -# Copyright (C) 1991 - 2017 - EDF R&D - www.code-aster.org +# Copyright (C) 1991 - 2023 - EDF R&D - www.code-aster.org # This file is part of code_aster. # # code_aster is free software: you can redistribute it and/or modify @@ -27,7 +27,7 @@ if(DEFINED ENV{DEVTOOLS_TEST_RUNNER}) set(runner "$ENV{DEVTOOLS_TEST_RUNNER}") endif() -# test_hgaster checks ~/.hgrc - run first +# test_hgaster checks ~/.gitconfig - run first foreach(tfile ${testlist}) get_filename_component(base ${tfile} NAME) set(TEST_NAME DEVTOOLS_${base}) -- GitLab