[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] [BUG] add in commit dialog, default prop: eol, inconsistent newlines

From: Grzegorz Sobanski <silk_at_boktor.net>
Date: 2005-03-22 23:06:34 CET

Hi

Please CC: me, as I'm not subscribed to the list.

Short description:
Selecting files to add in commit dialog, with auto-prop eol:native, and
files with inconsistent newlines ends in non-atomic commit without any
message to user.

Long description:

Environment:
Windows XP SP2
TortoiseSVN 1.1.3, Build 2502, UNICODE
Subversion 1.1.3,
apr 0.9.5
apr-iconv 0.9.5
apr-utils 0.9.5
berkeley db 4.2.52
neon 0.24.7
OpenSSL 0.9.7e 25 Oct 2004
zlib 1.2.2

Relevant part of config from "Documents Settings\...\Subversion:
[auto-props]
*.c = svn:keywords=Id Revision;svn:eol-style=native
*.cpp = svn:keywords=Id Revision;svn:eol-style=native

Local directory with already done checkout.
Remote repository on Debian Sid box, Subversion 1.1.3-2

Steps to reproduce:
New files copied to local directories (more then 1).
Those files have inconsistent endlines.
Example: http://boktor.net/files/bugreports/a.cpp
Copy it to local directory as a.cpp, b.cpp, and so on,
but two files are enough.

Right click on directory, select SVN Commit.
On files list mark both files to add them to repository.
Click OK.

Effect:
Only one of those files is added to repository. Any subsequent files
(marked to add) are quietly ignored, they are not added.
No message is showed that those files (the one added, and others)
have inconsistent newlines.
The first file and any other modification made to files already in
repository are commited to remote repository.
Effect is not full/atomic commit.

If there are files *without* inconsistent newlines added from the same
dialog, but are "later" then this one with inconsistent newlines, they
are ignored too. Ie. adding stops after first file with inconsistent
newlines.

Ignored files are not shown in window with commit log.

It is pretty dangerous behavior, as user is not informed that some files
were not added to repository although he has issued command to add them.

Expected behaviour:
a) An error/warning dialog box is showed saying that those files have
inconsistent newlines, and no commit is issued.
b) All files are added to repository, and commit is issued, but warning
window with list of files with inconsistent newlines is shown.

Solution "B" seems to be a lot of work.
"A" looks as good solution for the time being.
Moreover - all files should be marked as "to add" not only the first,
or the first one should not be added.

Some more thoughs: (I'm pretty sure it is related)
After selecting files and issuing TortoiseSVN->Add menu command files are
marked as "to add" as long as none of them has inconsistent newlines.
If such file is encountered adding stops with warning message.
For me this behavior is not what I expected, too. I was sure this file
was *not* marked as "to add". But it was. And marking subsequent files
stopped.
I would suggest at least changing message from:
        File 'E:/testy/a/b.cpp' has inconsistent newlines
to
        File 'E:/testy/a/b.cpp' has inconsistent newlines but was added to
        repository.

Real spolution should not mark this file as "to add", or should not stop
after it, but finish adding all files and issue.

I think existing solution is inconsistent - if "inconsistent newlines"
is error - file should not be marked as added and commit should be not
allowed. But if it is only a warning, it should not interrupt adding
subsequent files.

I have already looked in list archives, and trunk changelog, but
haven't seen similar problem/patch.

Please CC: me, as I'm not subscribed to the list.

Best regards

-- 
Grzegorz "Silk" Sobañski        silk (at) boktor.net
An algorithm must be seen to be believed.
        -- D.E. Knuth
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Mar 23 09:09:34 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.