Skip to content

Commit

Permalink
Merge pull request #4650 from ESMCI/fix-xmlchange
Browse files Browse the repository at this point in the history
Fixes check_lockedfiles call in xmlchange

Fixes check_lockedfiles only being called once when multiple settings
are changed.
Fixes reporting settings that are component specific
Test suite: n/a
Test baseline: n/a
Test namelist changes: n/a
Test status: n/a

Fixes #4643

User interface changes?: n/a
Update gh-pages html (Y/N)?: n
  • Loading branch information
jgfouca authored Jul 11, 2024
2 parents ca6c0cd + 2fb1de2 commit 783f23a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions CIME/Tools/xmlchange
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,6 @@ def xmlchange_single_value(

if xmlfile is not None:
xmlfile = [xmlfile]
# Pass caseroot, in cases where --file is used and case does not have access to env_case.xml
check_lockedfiles(
case, skip=["env_case"], quiet=True, caseroot=caseroot, whitelist=xmlfile
)
else:
logger.warning("'%s' = '%s'", xmlid, xmlval)

Expand Down Expand Up @@ -313,6 +309,13 @@ def xmlchange(
xmlfile,
)

check_lockedfiles(
case,
skip=["env_case"],
caseroot=caseroot,
whitelist=xmlfile,
)

if not noecho:
argstr = ""
for arg in sys.argv:
Expand Down
2 changes: 1 addition & 1 deletion CIME/XML/entry_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def compare_xml(self, other, root=None, otherroot=None):
"{}_{}".format(vid, comp), resolved=False
)
if f1val != f2val:
xmldiffs[vid] = [f1val, f2val]
xmldiffs[f"{vid}_{comp}"] = [f1val, f2val]
else:
if node != f2match:
f1value_nodes = self.get_children("value", root=node)
Expand Down

0 comments on commit 783f23a

Please sign in to comment.