Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templater: translate keywords to "self" methods by core template engine #3121

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

yuja
Copy link
Contributor

@yuja yuja commented Feb 22, 2024

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

yuja added 5 commits February 22, 2024 20:59
We do clone Operation object in several places, and I'm going to add one more
.clone() in the templater. Since the underlying metadata has many fields, I
think it's better to wrap it with Arc just like a Commit object.
This is copied from the commit templater. I'm going to extract the "self"
property handling to the core template builder, and build_keyword() methods
will be replaced with that.
There are no keywords or methods that return Operation yet, but we might add
"self" keyword that returns the context object.
This eliminates the separate keywords table. All keywords are resolved through
the pseudo "self" property. Maybe we'll add "self" keyword/variable later.
@torquestomp torquestomp self-assigned this Feb 22, 2024
@yuja yuja merged commit e80b906 into jj-vcs:main Feb 23, 2024
15 checks passed
@yuja yuja deleted the push-rvnluxzztoxx branch February 23, 2024 01:13
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.

2 participants