Skip to content

Conversation

@norbertwg
Copy link
Contributor

@norbertwg norbertwg commented Oct 9, 2023

closes #2238

  • The syntax: the tag name has to be enclosed in colons.
  • The placeholder will be replaced by translated value, not by the plain value.
  • Characters in tag's translated value, which are not allowed in file names, will be replaced by underscore.

@ghost
Copy link

ghost commented Oct 9, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@norbertwg
Copy link
Contributor Author

When replacing characters, which are invalid in file names, it is currently only distinguished between Windows and others. I tried to separate Mac OS and Linux/Unix as well, but I am not sure how to do it. In XMP_environment.h I found a line of code, but it was commented with /* Todo: How to correctly recognize a Mac platform? */. The same problem I have with the test case. If somebody can give me a hint, I can refine the logic to differentiate the operating systems.

@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #2791 (a2b60a4) into main (fe44c8c) will increase coverage by 0.10%.
Report is 5 commits behind head on main.
The diff coverage is 90.47%.

@@            Coverage Diff             @@
##             main    #2791      +/-   ##
==========================================
+ Coverage   63.96%   64.07%   +0.10%     
==========================================
  Files         103      103              
  Lines       22344    22363      +19     
  Branches    10835    10851      +16     
==========================================
+ Hits        14293    14328      +35     
+ Misses       5828     5813      -15     
+ Partials     2223     2222       -1     
Files Coverage Δ
app/actions.cpp 68.55% <90.47%> (+0.92%) ⬆️

... and 5 files with indirect coverage changes

@norbertwg
Copy link
Contributor Author

This pull request is waiting for approving review since 6 months. Are there reasons not to approve this request or was it just lost out of sight?

@norbertwg norbertwg force-pushed the rename-to-allow-all-exiv2-tags branch from 28ad5f8 to 660cfcb Compare November 27, 2024 16:18
optimise regex and remove duplicate call of ImageFactory
optimise regex and remove duplicate call of ImageFactory
tests adjusted for msys and cygwin;
regex contains "Exif" for better filtering;
documentation adjusted
for concatenation of new file name, concatenation operator of std::filesystem::path is not used:
On MSYS2 UCRT64 the path separator to be used in terminal is slash, but as concatenation operator a back slash will be added. Rename works but with verbose a path with different operators will be shown.
@Saijin-Naib
Copy link

I think this would be incredibly handy for sure.

kevinbackhouse added a commit to kevinbackhouse/exiv2 that referenced this pull request Aug 22, 2025
@kevinbackhouse
Copy link
Collaborator

@norbertwg: I've suggested a few minor changes here: kevinbackhouse@f10edc6

@kevinbackhouse
Copy link
Collaborator

@kmilos: This change looks fine to me. It fell through the cracks and never got merged. Shall we backport it and include it in 0.28.6?

@kevinbackhouse kevinbackhouse self-assigned this Aug 23, 2025
@kevinbackhouse
Copy link
Collaborator

@mergify backport 0.28.x

@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2025

backport 0.28.x

✅ Backports have been created

Details

@kevinbackhouse
Copy link
Collaborator

@neheb: do you know anything the failing workflow "On PRs - meson / macOS-deps=enabled"? It looks like a genuine test failure, but it's a bit weird that it's the only one that's failing.

@neheb
Copy link
Collaborator

neheb commented Aug 23, 2025

It’s a race condition with the tests. I have them set to run in parallel. Just rerun the workflow.

@kevinbackhouse
Copy link
Collaborator

It’s a race condition with the tests. I have them set to run in parallel. Just rerun the workflow.

I've tried it another two times and it keeps failing. This is the error:

======================================================================
ERROR: geotag_test (testcases.TestCases.geotag_test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/runner/work/exiv2/exiv2/tests/bash_tests/testcases.py", line 440, in geotag_test
    BT.reportTest('geotag-test', out)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/work/exiv2/exiv2/tests/bash_tests/utils.py", line 588, in reportTest
    raise RuntimeError(f"\n{log.to_str()}")
RuntimeError: 
Error:  The output of the testcase mismatch the reference
[INFO] The output has been saved to file /Users/runner/work/exiv2/exiv2/test/tmp/geotag-test.out
[INFO] simply_diff:
/Users/runner/work/exiv2/exiv2/test/data/test_reference_files/geotag-test.out: 28 lines
/Users/runner/work/exiv2/exiv2/test/tmp/geotag-test.out: 35 lines
The first mismatch is in line 14:
< --- run geotag ---
> Exif.Image.GPSTag                            Long        1  668

----------------------------------------------------------------------
Ran 67 tests in 104.158s

FAILED (errors=1)

@neheb
Copy link
Collaborator

neheb commented Aug 24, 2025

Oh GPS. That’s a different one. It usually fails on a copyright tag.

@kmilos
Copy link
Collaborator

kmilos commented Aug 26, 2025

CI is green now (I guess some macos runner/Homebrew transient fluke?) - merge + backport?

@neheb
Copy link
Collaborator

neheb commented Aug 26, 2025

Sure

@kmilos kmilos merged commit 603c8cb into Exiv2:main Aug 26, 2025
208 of 214 checks passed
@Saijin-Naib
Copy link

You all rock! Thank you!

@norbertwg norbertwg deleted the rename-to-allow-all-exiv2-tags branch August 26, 2025 14:02
@norbertwg
Copy link
Contributor Author

@kevinbackhouse , @neheb , @kmilos
Thank you that my pull request found its way into a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: exiv2 rename to allow all exiv2 tags

5 participants