You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@red-bean.com> on 2007/08/20 21:35:14 UTC
Re: Faulty line-end handling in "svnadmin load"?
Michael Haggerty <mh...@alum.mit.edu> writes:
> On the cvs2svn mailing list, somebody wrote the message quoted below.
> He claims, basically, that if a file that has svn:eol-style=CRLF is
> written to a dump file with different line-end convention, then "svn
> diff" gets confused.
What's scary about this question is that it (maybe?) implies that an
SVN dumpfile can have different line-end conventions :-).
http://svn.collab.net/repos/svn/trunk/notes/dump-load-format.txt
strongly implies (without quite stating explicitly) that LF is the
line-ending format for a dumpfile, in the sense that the metadata
sections should have lines ending with LF. Of course, the format is
really binary, since a given file's contents within a dumpfile might
contain anything at all.
Regarding file contents:
As Mike Pilato pointed out, text files with svn:eol-style set to
'native' should be repository normal form (LF); files with
svn:eol-style set to a specific line-ending format should be stored in
that format; and files without the property are just binary blobs, for
the purposes of line-endings.
So I don't know how this person's CRLF file got written to the
dumpfile with a different line-end convention, but that's where the
badness stared. If Subversion did that, then Subversion has a bug.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Faulty line-end handling in "svnadmin load"?
Posted by Karl Fogel <kf...@red-bean.com>.
"David Glasser" <gl...@davidglasser.net> writes:
> On 8/20/07, Michael Haggerty <mh...@alum.mit.edu> wrote:
>> But if it causes Subversion problems to have a file with
>> svn:eol-style=CRLF but contents using RNF, then I claim that "svnadmin
>> load" should reject such data with an error message rather than silently
>> accepting inconsistent data. If you agree then I will check in a
>> Subversion bug to that effect.
>
> I would support a warning in svnadmin load (but probably not an error)
> for any invalid svn:* property; see svn_wc_canonicalize_svn_prop.
I think either error out or warning is okay. Maybe error out, and
user can reinvoke with -f to tell 'svnadmin load' to do its best to
load the data, converting eols if necessary?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Faulty line-end handling in "svnadmin load"?
Posted by David Glasser <gl...@davidglasser.net>.
On 8/20/07, Michael Haggerty <mh...@alum.mit.edu> wrote:
> But if it causes Subversion problems to have a file with
> svn:eol-style=CRLF but contents using RNF, then I claim that "svnadmin
> load" should reject such data with an error message rather than silently
> accepting inconsistent data. If you agree then I will check in a
> Subversion bug to that effect.
I would support a warning in svnadmin load (but probably not an error)
for any invalid svn:* property; see svn_wc_canonicalize_svn_prop.
--dave
--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Faulty line-end handling in "svnadmin load"?
Posted by Michael Haggerty <mh...@alum.mit.edu>.
C. Michael Pilato wrote:
> Michael Haggerty wrote:
>> 3. Or is it indeed an intended requirement of "svnadmin load" that
>> files be committed using the same line-end convention as specified in
>> their svn:eol-style property (i.e., a cvs2svn bug)?
>
> Yep.
Karl Fogel wrote:
> So I don't know how this person's CRLF file got written to the
> dumpfile with a different line-end convention, but that's where the
> badness stared. If Subversion did that, then Subversion has a bug.
The dumpfile was written by cvs2svn, which currently normalizes all
non-binary files to RNF (i.e., always LF). I will obviously have to
change this behavior.
But if it causes Subversion problems to have a file with
svn:eol-style=CRLF but contents using RNF, then I claim that "svnadmin
load" should reject such data with an error message rather than silently
accepting inconsistent data. If you agree then I will check in a
Subversion bug to that effect.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org