Patch #22337
closedIgnore settings.yml in git/hg for cleaner repository updates
0%
Description
Linked from github: https://github.com/redmine/redmine/pull/77
I have renamed config/settings.yml to config/settings.yml.example and ignored config/settings.yml in .gitignore and .hgignore.
The main reason I would like to see this included in the repository is to be able to simply update redmine via git/hg.
As an example, I am using redmine-like-a-boss, which always includes redmine in the last stable version as a submodule. I want to be able to simply git checkout LATEST_TAG if a newer version is released and don't worry about that my settings.yml file will be overwritten by a pull.
I guess others will probably also want to use redmine update mechanisms via git pull or an equivalent for hg.
The only drawback of this pull request is that you might need to extend the redmine installation documentation with
cp config/settings.yml.example config/settings.yml
But afterwards, the update management will be easier.
Thanks
Files
Updated by Toshi MARUYAMA about 9 years ago
-1 because source:tags/3.2.1/config/settings.yml#L19 says "DO NOT MODIFY THIS FILE !!!".
Updated by Cy topia about 9 years ago
The file is not modified!!
It is simply renamed to settings.yml.example
This is simply in order to avoid conflict when git-pulling a new Redmine version via git/hg
Updated by Toshi MARUYAMA about 9 years ago
Did you read this line?
source:tags/3.2.1/app/models/setting.rb#L229
Updated by Toshi MARUYAMA about 9 years ago
Cy topia wrote:
This is simply in order to avoid conflict when git-pulling a new Redmine version via git/hg
Why conflict happens?
Updated by Cy topia about 9 years ago
Sorry, conflict was the wrong word.
When I check out redmine via git/hg settings.yml is tracked (by git and hg), meaning as soon as I edit this file, the git/hg repository will be unclean.
So when i re-checkout this file or stash the repository, all my changes in the configuration file will be lost.
My suggestion was to completely ignore this file via .gitignore and .hgignore and instead distribute a file called settings.yml.example (Just as is done with database.yml.example and additional_environment.rb.example).
Updated by Toshi MARUYAMA about 9 years ago
Cy topia wrote:
Sorry, conflict was the wrong word.
When I check out redmine via git/hg settings.yml is tracked (by git and hg), meaning as soon as I edit this file, the git/hg repository will be unclean.
Why did you edit settings.yml?
So when i re-checkout this file or stash the repository, all my changes in the configuration file will be lost.
My suggestion was to completely ignore this file via .gitignore and .hgignore and instead distribute a file called settings.yml.example (Just as is done with database.yml.example and additional_environment.rb.example).
database.yml and additional_environment.rb are edited by user.
But settings.yml is NOT edited by user.
Updated by Cy topia about 9 years ago
I see, then i totally got it wrong.
Where do you edit
default: localhost:3000
to something custom then?
Updated by Toshi MARUYAMA about 9 years ago
- Status changed from New to Closed
Cy topia wrote:
I see, then i totally got it wrong.
Where do you edit
default: localhost:3000
This will change on Web UI.