Commit Graph

4 Commits

Author SHA1 Message Date
Jeff Young 80ab928e34 Better error reporting from TEXT_EVAL_VCS.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23069
2026-02-14 20:27:27 +00:00
Jeff Young ae43e064b0 Formatting. 2026-02-14 20:20:36 +00:00
Mark Roszko b04c16d7e8 Add missing include due to std::vector<wxString> template expansion export 2026-01-21 07:57:01 -05:00
Matthias B. 5368791a62 Add VCS functions to text evaluation system
Expose version control system metadata through text evaluation expressions,
allowing text fields to reference VCS information dynamically.
This is useful for placing up to date version information on PCB
silkscreen or in other design text fields.

Added functions (vcs* prefix for VCS-agnostic naming):
- vcsidentifier([length]) - HEAD commit identifier (default: full hash)
- vcsfileidentifier(file, [length]) - last commit identifier that modified file
- vcsnearestlabel([match], [anyTags]) - nearest tag/label from HEAD
- vcslabeldistance([match], [anyTags]) - commits since nearest tag
- vcsdirty([includeUntracked]) - "1" if dirty, "0" if clean
- vcsdirtysuffix([suffix], [includeUntracked]) - suffix if dirty, empty if clean
- vcsbranch() - current branch name
- vcsauthor() - HEAD commit author name
- vcsauthoremail() - HEAD commit author email
- vcscommitter() - HEAD commit committer name
- vcscommitteremail() - HEAD commit committer email
- vcscommitdate([format]) - HEAD commit date
- vcsfileauthor(file) - author of last commit that modified file
- vcsfileauthoremail(file) - author email of last commit that modified file
- vcsfilecommitter(file) - committer of last commit that modified file
- vcsfilecommitteremail(file) - committer email of last commit that modified file
- vcsfilecommitdate(file, [format]) - date of last commit that modified file

Date format options: "ISO", "US", "EU", "Chinese", "Japanese", "Korean",
"long", "short".

Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
2026-01-19 16:06:23 -08:00