MMEX Desktop v1.3.4.rc.3 is ready https://github.com/moneymanagerex/money ... 1.3.4-rc.3

Subversion EOL issue

Money Manager Ex Development related posts
(http://github.moneymanagerex.org/)
omalleypat
MMEX Developer
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Subversion EOL issue

Post by omalleypat »

Wes and I bumped into a small issue last night that I think can be attributed to EOL (end-of-line) characters handling in subversion. I had noticed some wacky behavior with diff before but I finally figured it out. When I was making patches to send to Nikolay, there would frequently be lines that were reported as changed, but on looking at the diff, they appeared to be the same. I knew I didn't change those particular lines in the file, so I just deleted them from the diff for the patches. In Wes' last commit, the file /src/util.cpp was committed, even though he didn't really make any changes. Last night, I had a little ah-ha moment and decided to check the EOL characters. It turns out that it is due to differences in end-of-line characters used by XCode (Mac IDE) and some other editor used by one of the other developers. For example, if you run:

Code: Select all

svn diff -c 649 util.cpp
it will report a ton of changes, but it appears that nothing is really changed looking at the diff (the -c # option by the way is to do a diff based on what was changed for a specific revision number, in this case 649, in case anyone is unfamiliar). That is because the EOL character has changed. You can verify that it is EOL business by running:

Code: Select all

svn diff -c 649 -x --ignore-eol-style util.cpp
which will show no differences.

I propose we set the subversion EOL style property (I guess to "native") so we can stop this from being an issue. See this: http://svnbook.red-bean.com/en/1.1/ch07s02.html (scroll down to svn:eol-style. I think this should solve our problem and prevent future superfluous commits from everyone.

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Subversion EOL issue

Post by Vadim »

I've set svn:eol-style for trunk files.

Also good idea for developers who commit to svn modify theirs Subversion's config file and uncomment next lines for section
### 'enable-auto-props' option.
*.c = svn:eol-style=native
*.cpp = svn:eol-style=native
*.h = svn:eol-style=native

and for others files which use in MMEX

madhan
Site Admin
Posts: 99
Joined: Sun Nov 30, 2008 8:06 pm

Re: Subversion EOL issue

Post by madhan »

Where is this configuration setup for TortoiseSVN in Windows?

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Subversion EOL issue

Post by Vadim »

%APPDATA%\Subversion\config for svn. I think this will be enough.

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Subversion EOL issue

Post by Vadim »

I have applied svn:eol-style for 0.9.5 branch (only to .cpp & .h sources in include and src).

omalleypat
MMEX Developer
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: Subversion EOL issue

Post by omalleypat »

Vadim,

Good point. The Mac/Linux config file is at ~/.subversion/config. Just to clarify, you also need to uncomment the enable-autoprops=yes line itself. Mine looks like this:

Code: Select all

### Set enable-auto-props to 'yes' to enable automatic properties
### for 'svn add' and 'svn import', it defaults to 'no'.
### Automatic properties are defined in the section 'auto-props'.
enable-auto-props = yes

### Section for configuring automatic properties.
[auto-props]
### The format of the entries is:
###   file-name-pattern = propname[=value][;propname[=value]...]
### The file-name-pattern can contain wildcards (such as '*' and
### '?').  All entries which match will be applied to the file.
### Note that auto-props functionality must be enabled, which
### is typically done by setting the 'enable-auto-props' option.
*.c = svn:eol-style=native
*.cpp = svn:eol-style=native
*.h = svn:eol-style=native

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Subversion EOL issue

Post by Vadim »

Yes, you are right :-)

omalleypat
MMEX Developer
Posts: 112
Joined: Tue Jul 28, 2009 10:34 pm
Are you a spam bot?: No
Location: Atchison, KS

Re: Subversion EOL issue

Post by omalleypat »

I was just poking around the repository for something unrelated and I found tools/eolfix.exe. Should we get rid of that? If it does what I think, it should be unnecessary.

Vadim
MMEX Developer
Posts: 142
Joined: Mon Aug 03, 2009 7:35 am
Are you a spam bot?: No

Re: Subversion EOL issue

Post by Vadim »

Personally I did not use it at all. I have full suite of software from GnuWin32 which includes dos2unix & unix2dos. I think such programs as eolfix.exe unnecessary in svn and should be deleted. I added upx.exe only because it uses in our makefiles and thus must be always available.

elliswr
MMEX Developer
Posts: 102
Joined: Tue May 05, 2009 8:21 am
Are you a spam bot?: No
Location: Granbury, TX
Contact:

Re: Subversion EOL issue

Post by elliswr »

Yeah, so note to self: If you are using Xcode for managing SVN, do not put native for the type. I don't know what to put yet, but making these changes to the subversion config file absolutely breaks SVN in Xcode 3.2.1

I'll update when I find out a fix.

Post Reply