Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.
Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
The paths weren't properly escaped for URLs. This fix allows any
subdirectory of arbitrary chars to be displayed as a checkout URL.
This also fixes an escaping issue in the adapter that prohibits checking
folder with special characters which SVN doesn't care about.
Provides a simple mod-perl based Apache wrapper around
remote repositories.
As its functionality is very limited, it is probably not of much use outside of the packager context.
This commit starts the work to provide functionality with remote service hooks for managing repositories.
The main driver behind this is packager, for which we want apache to be the sole owner of the repositories it delivers, and OpenProject only as a reader, however it benefits other installations as well.
This commit provides some helpers to alleviate SCM vendor plugins:
* Provide code notifications when project, members and users are changed.
* Allow Repository:* to determine base URL themselves
(when no common URL is available)
* Open Git adapter for subclassing (Gitolite)
This commit changes the behavior of removing repositories.
It is no longer possible to remove a managed repository (model) when the
underlying repository directory could not be removed.
This error originally occurred when Apache committed changes to the repository
through mod_svn, which resulted in the OpenProject user being unable to
delete a particular subdirectory.
- Defaults to localized instruction when none is provided in the
settings
- Make readonly input visually clickable, not disabled
- Renamed `permission?` to `permissions?`
While rolling out on dev, we found that apache by default modifies
the access permissions of a repository.
This in turn causes the deletion of a repository to no longer complete
sucessfully, but return with a permission error.
This error was not caught an escalated into a 500 on the repository
settings.
This commit adds very basic checkout instructions similar
to `openproject-checkout` to repositories.
Issues:
* Uses table style for checkout component, as exact styling is unclear
* Adds compressed table style with less padding
* Checkout settings are best organized in a Hash with keys per SCM
* vendor. Using default settings, a lot of new setting values would be
introduced
* Checks for Hash in SettingsController
* Currently can't use SettingsHelper, as it requires single setting
values
ENV-based configuration for various configs can only provide
case-insensitive values for SCM configuration and thus is
unable to properly configure, e.g., managed repositories.
This refactoring relies on lowercase configuration and symbols
to define SCM vendors, and camelizes them to the old notation
(e.g., :git => 'Git') when using `Setting.enabled_scms` to remain
compatible with previous installations.
This commit removes the project hierarchy introduced with
repository management.
They are not required, incompatible with mod_dav_svn and provide
little to none advantage to storing all repositories in a flat
structure for the scale we require.
This commit:
- adds error messages for filesystem errors
- Forces services and views to use repository.root_url instead of
managed_path, which may not be available when config is missing
Previously, repositories could not be deleted on disk when the
`manages:` configuration entry was removed in the meantime.
This commit allows repositories to be deleted in that case because we
no longer depend on accessing the managed_root (path for `manages:`).
This commit (temporarily) removes the delayed creation and deletion of
managed repositories for the sake of improvded error handling.
After consultation with @ulferts, we suggest to improve the `Delayed::Job`
pipeline to create means for identifying jobs (referenced ID) and to
create a unified service to manage database AND filesystem access in a
transactional manner.
Also provides the following corrections:
- Improve migration speed
- Delete parent projects only by their identifier, not the managed root
- switched to toggleable-attribute-groups to provide means for
adding buttons in the attribute header (e.g., delete button).
- added separate destroy_info page with different notifications
for managed and linked repositories to ensure ramifications of removing
physical repositories are communicated to the user.
- Fixed several issues regarding scm_type selection and the building
of repositories.
Open questions still concern the question of acessing unsupported
repositories (e.g., the soon-to-be-removed filesystem adapter).
Acessing the class should will then throw an error, but we still have
to allow users to remove the affected repository (somehow).
This PR begins the push towards management of repository lifetime
from within OpenProject.
What this currently provides is the following:
- A mixin `ManageableRepository`, included by `Repository::{Git,
Subversion}` to provide an interface to repo management
- Two services and delayed_job workers for creating (`CreateManagedRepositoryService`) and
deleting (`DeleteRepositoryService`)
- Customized rendering of subforms in the repository settings for
arbitrary SCM vendors.
TODOS:
- [x] Provide sane ground to work on ( cf. PR #3149 )
- [x] Rework SCM settings form (`{scm}_tags` is currently HTML generated
from within a Helper.)
- [x] Ease integration of arbitrary SCM vendors
- [x] Display meaningful error / warning when user looks at bare
repository (currently outputs 500, as Git HEAD / svn revision is not
available)
- [x] I18n
- [ ] Specs (in progress)
- [x] Fix legacy specs
- [ ] Decide what to do with `Filesystem` adapter.
Open Questions:
- **Configuration**: Currently replaces the existing options in
`configuration.yml`.
- **Implementation specifics**:
- Sub-projects repositories reside in a hierarchy below their parents
- How should the delayed_job react upon failure? (esp. creation of
repositories)
Relevant work package: https://community.openproject.org/work_packages/20416
Merge dependent on PR #3149
Related work package: [#20415](https://community.openproject.org/work_packages/20415).
This is a combined refactoring and extraction effort of local SCM functionality for SVM, Git adapters in preparation for the explicit lifetime management of repositories in #20416 and implementation of (local) repository storage quota in #18393.
This PR is still heavily WIP and for the time being, depends on the **legacy specs** for testing.
To run the tests, execute the following steps:
~~~
rake test:scm:setup:all
rake spec:legacy
~~~
I'm open for ideas on how we integrate scm adapters tests into current specs.
---
- [x] Exchange `IO::Open` for `Open3` to avoid countless manual exitcode checks
- [x] Extract local functionality in its own Module
- [] Extend `LocalClient` module with links to create/delete services for #20415
- [x] Break down unbearable local parse routines (Hound will be over the place until fixed - but down from 260 to < 20)
- [x] `entries`
- [x] `revisions`
- [] local repository factory
- [] Specs
- [] Fix / Modernize
- [] More adapter-related specs