#12410 closed enhancement (fixed)
[patch] refresh relation
Reported by: | kolesar | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.02 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Added a button at the top of relation editor to refresh data from layer. It helps to avoid self-conflict if ways to be added need cut while dialog is open.
Refresh button is disabled if relation is not saved yet or relation on layer equals initial snapshot stored in editor.
Apply button is disabled if dialog content equals to initial snapshot. When tags or members are modified, button is enabled. After applying changes button is disabled again.
Attachments (1)
Change History (18)
comment:1 by , 9 years ago
by , 9 years ago
Attachment: | RefreshRelationEditor.patch added |
---|
follow-up: 6 comment:2 by , 9 years ago
Updated patch. Only one line was modified near my changes.
However I got difficulties with different line endings in files. Don't you have a standard line ending, preferably LF?
comment:4 by , 9 years ago
Milestone: | → 16.02 |
---|
comment:5 by , 9 years ago
thanks for the patch! I don't think we have any standard line ending. Maybe we should :)
follow-up: 8 comment:6 by , 9 years ago
However I got difficulties with different line endings in files. Don't you have a standard line ending, preferably LF?
SVN auto-handles this and uses "\n" for Linux/Unix and "\r\n" for Windows. For patches Unix format is preferred (\n), as this makes less trouble in case something gets overlooked.
comment:8 by , 9 years ago
Replying to stoecker:
However I got difficulties with different line endings in files. Don't you have a standard line ending, preferably LF?
SVN auto-handles this and uses "\n" for Linux/Unix and "\r\n" for Windows. For patches Unix format is preferred (\n), as this makes less trouble in case something gets overlooked.
I checked out repository from git mirror, some files have CRLF line endings. Git preserves line endings by default, will override to LF as I use Linux.
follow-up: 11 comment:9 by , 9 years ago
Subverison will change the line ending style to the system default, when the file has the svn property svn:eol-style native
. This is missing for some of the files this patch touches, which is the reason for the issues with mixed line endings.
Fixing this now would break patches in the queue, so we better wait till there are fewer patches pending.
@team: Please configure subversion, such that svn:eol-style native
is added automatically to every new java file (if you haven't already done so)!
See https://www.mediawiki.org/wiki/Subversion/auto-props, the required line is *.java = svn:eol-style=native
.
comment:10 by , 9 years ago
OK I'll do it :) if not already there, it should also be added to the developer guide :)
follow-up: 16 comment:11 by , 9 years ago
Replying to bastiK:
Fixing this now would break patches in the queue, so we better wait till there are fewer patches pending.
Why? For proper files it means no change. Others should be fixed and the patch command can handle EOL differences, so that also does no harm. I found 65 files which don't pass my style validator, probably 55 of these are due to \r\n checkin. Waiting will cause other issues, so I'll fix the problematic files with next checkin.
comment:14 by , 9 years ago
In the past I did that sort of cleanup a bit more often...
Note: I left the style of the included external sources even if they do not match.
follow-up: 17 comment:16 by , 9 years ago
Replying to stoecker:
Replying to bastiK:
Fixing this now would break patches in the queue, so we better wait till there are fewer patches pending.
Why? For proper files it means no change. Others should be fixed and the patch command can handle EOL differences, so that also does no harm.
Last time I checked, the patch command was not really great with inconsistent EOL. Only a small number of files are affected, so it shouldn't be too bad in any case.
comment:17 by , 9 years ago
Last time I checked, the patch command was not really great with inconsistent EOL. Only a small number of files are affected, so it shouldn't be too bad in any case.
On Linux doesn't it ask when it detects "\r\n" in patches? Anyway tools dos2unix and unix2dos can help as well as oneliners like perl -pe 's/\r//g' file >file2
or sed -i 's/\r//g' file
the patch must be refreshed with latest changes on relation editor (see #12412)