Project

General

Profile

Actions

Patch #22337

closed

Ignore settings.yml in git/hg for cleaner repository updates

Added by Cy topia about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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

ignore-settings.yml-git.diff (16.7 KB) ignore-settings.yml-git.diff Cy topia, 2016-03-29 13:10
Actions #1

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 !!!".

Actions #2

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

Actions #3

Updated by Toshi MARUYAMA about 9 years ago

Actions #4

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?

Actions #5

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).

Actions #6

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.

Actions #7

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?

Actions #8

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.

Actions #9

Updated by Cy topia about 9 years ago

Thx, sorry for the trouble

Actions

Also available in: Atom PDF