When creating a project from a template, subdirectories that match the
template project name (either exactly or with a suffix like "-dir") were
not being renamed to match the new project name. Only files were being
renamed correctly.
This fixes both GetDestinationFiles() and CreateProject() to also rename
directory names in the destination path that contain the template basename.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22289
Local history combines project backup and autosave into a single place
where arbitrary history can be stored efficiently and restored to any
point in time. Git commits are made on a debouce timer to hold
modifications, allowing the user to step backwards in time to arbitrary
points. Restoring backups does not remove the existing files and
choosing to restore an autosave point does not remove the state of the
files prior to the restore, providing additional safety.
Keeps the maximum storage size limit but removes the additional
limitations of number of backups/backups per day, etc as these are not
relevant to a CoW-based backup as unchanged files do not take up
additional space.
Avoids cloning the .git subdirectory and will also avoid any files
listed as ignored in the .gitignore file. It will copy both gitignore
and gitattributes into the new project
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16507
Translated strings must use Printf to be built, and cannot be created by
concatenating sub strings that fixes the word ordering (that should be
depending on language)
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
Reject all hidden folders and files when copying the template files, only allow '.gitignore', '.gitattributes' files as these are likely intended. Do not copy `.lck`, `autosave` or `backup` files
Do no rename symbol library files to the new project name. Only rename
the cache library. This prevents breaking symbol library links in the
schematic due to the project symbol library table pointing to the wrong
library file name.
Fixes lp:1837667
https://bugs.launchpad.net/kicad/+bug/1837667
This fixes two display issues in the project template selector. The
first captured HTML tags in the template title display and the second
prevented more than one line for showing (at least on GTK) in the
preview. This prevented disambiguation between the various templates.
(cherry picked from commit 24b032ce5b)
Add tests to check for existing files before copying template files.
Split load project, create new project, create new project from template,
and load project from history command events into simple methods that
perform the correct actions before loading the project. This greatly
simplifies the code.
Create a load project method that can be called from the event handlers
above. This simplified a lot of duplicate code that existed in many of
these event handlers.
Remove the dummy "noname.pro" file creation which created required some
ugly code to prevent this file from being created unexpectedly. Now
KiCad launches without setting a project file name when appropriate.
Fixes lp:1713951
https://bugs.launchpad.net/kicad/+bug/1713951
File "rules" has instructional text as comments near top.
2) Convert all text files in repo to LF line ending form.
Any checkout done with "rules" in play will convert the working
tree to native line ending, while keeping repo as LF line ending.