Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S
slapos.recipe.template
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • nexedi
  • slapos.recipe.template
  • Merge Requests
  • !5

Closed
Opened Jan 06, 2021 by Xavier Thompson@xavier_thompson
  • Report abuse
Report abuse

jinja2: Prevent the 'once' option from overwriting the rendered file

This allows passing path of the rendered file as the 'once' option, which in turn means the template will be rendered only if the destination file doesn't already exist. Previously doing this would result in an empty rendered file.

Edited Jan 07, 2021 by Xavier Thompson

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch https://lab.nexedi.com/xavier_thompson/slapos.recipe.template.git template_without_overwrite
git checkout -b xavier_thompson/slapos.recipe.template-template_without_overwrite FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff xavier_thompson/slapos.recipe.template-template_without_overwrite

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 13
  • Commits 1
  • Changes 2
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/slapos.recipe.template!5
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7