Subversion is perfectly capable of handling any file. Why would it be
limited to text files only?

The merge operation is different because text files can often be merged
without destroying the content. Even if it causes invalid syntax, it's
generally easy to fix afterwards. If you try to merge two versions of a
real binary file, it will generally lead to an invalid file that cannot be
processed by any common program designed to operate on that file format.
Detecting if a file is binary is simply checking if the file contains any
byte not normally used for text. A null byte is most definitely such a byte.

It is up to each program to define how much they care. You can open any
file in notepad, even an exe, because it simply doesn't care that much.

If the designers of that other program believes this is a feature or an
acceptable behavior of their program, they are making a mistake, precisely
because of this effect on merge.

It looks like they keep the file contents in an internal oversized buffer
and then write the entire buffer to disk instead of stopping at the first
null byte. Probably it's a bug, and not an intentional design.




On Wed, 26 Jun 2019, 11:03 Alejandro Ariel Abaca via TortoiseSVN, <
tortoisesvn+apn2wqdqq-tzmmedha9jd7el5bgmux7qvzu7m4vrbgieuu3-o...@googlegroups.com>
wrote:

> I can understand what you mean with the concept of text files. Then I can
> ask why the commit command does indeen commit a file with this (bad) format
> when later other code in the same solution will not be able to use that
> commited file. I mean if the file is not a text file, then it is not for
> any programs. Right? I Will try to contact the reports provider. But, as I
> have stated, I have a number of this files already commited in my SVN
> repository. I would like to fix those issues too.
>
> Thanks for taking the time to answer me.
> Ariel.
>
>
>
>
> El miércoles, 26 de junio de 2019, 6:46:51 (UTC-3), Oskar Berggren
> escribió:
>>
>> A file is a sequence of bytes. If it contains characters typically not
>> found as part of normal text, then it is not a text file. That notepad can
>> read it doesn't prove much, bytes are bytes.
>>
>> I wonder if you can trick the merge program by setting svn mime type but
>> I'm not sure it will look at that. The feature you are looking for I
>> suppose is "treat all files as text" but I'm not sure if there is such a
>> setting.
>>
>> Have you reported the bug in the program that generates the faulty files?
>>
>> A script to remove the extra bytes perhaps?
>>
>> On Wed, 26 Jun 2019, 10:38 Alejandro Ariel Abaca via TortoiseSVN,  wrote:
>>
>>> I do not know exactly where they come from, but I have a theory: those
>>> files are generated from the GrapeCity ActiveReports designer itselft. I
>>> create a new report class for a new report and, only in some of the new
>>> clases, the .resx report contains those null bytes.
>>> Anyway, I would like the merge app to handle this files as they are not
>>> really 'not a text file' as I can open them in the Notepad editor. So, the
>>> question stands. Can I do something to change the behaviuor of the program
>>> when reading this files?
>>>
>>> Thanks in advance.
>>> Regards.
>>> Ariel.
>>>
>>>
>>> El martes, 25 de junio de 2019, 14:06:59 (UTC-3), Oskar Berggren
>>> escribió:
>>>>
>>>> I think the question you need to ask is where these null bytes come
>>>> from. I've never seen that behavior in resx before.
>>>>
>>>> On Tue, 25 Jun 2019, 11:55 Alejandro Ariel Abaca via TortoiseSVN, wrote:
>>>>
>>>>> Hello.
>>>>>
>>>>> I have a pretty large solution written in c# involving a project
>>>>> containing GrapeCity ActiveReports. The reports are c# classes that have
>>>>> .resx files attached. We are VC against VisualSVN using Tortoise and
>>>>> sometimes have problems with some of the .resx files when we want to
>>>>> compare the text file in the repo with the file in out local copy of the
>>>>> repository. The exact error is "The file
>>>>> <path-to-a-temp-file-in-my-profile-directory>.resx is not a valir 
>>>>> TextFile!"
>>>>>
>>>>> [image: Anotación 2019-06-25 074559-TortoiseSVNMerge-Problem.png]
>>>>>
>>>>>
>>>>>
>>>>> The image shows that the file is, indeed, a text file and It can be
>>>>> open with the (basic) Notepad app from Windows 10. But when I open the 
>>>>> same
>>>>> file with my copy of Sublime I found out that after the closing tag (the
>>>>> .resx file is an XML document), there are a number of CHAR(0) characters,
>>>>> as in the following picture:
>>>>>
>>>>> [image: Anotación 2019-06-25
>>>>> 074559-TortoiseSVNMerge-Problem-Sublime.png]
>>>>>
>>>>>
>>>>> So my guess is that the merge code is taking those CHAR(0) into
>>>>> account for resolving my repo file si not valid. Is there something I can
>>>>> do to resolve this Issue? Maybe there is a configuration that can be done
>>>>> that I do not know that can help. Otherwise, can Tortoise Merge forgive
>>>>> those CHAR(0) characters after the closing XML tag as they do not have any
>>>>> meaning out there?
>>>>>
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> From Argentina.
>>>>>
>>>>> Ariel.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "TortoiseSVN" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/tortoisesvn/d79eb17f-2566-4195-ad22-309fd3e0060f%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/tortoisesvn/d79eb17f-2566-4195-ad22-309fd3e0060f%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "TortoiseSVN" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/tortoisesvn/1e32aeae-b565-4906-a7ce-819a31efd122%40googlegroups.com
>>> <https://groups.google.com/d/msgid/tortoisesvn/1e32aeae-b565-4906-a7ce-819a31efd122%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "TortoiseSVN" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tortoisesvn/475302c0-07e6-4bd9-bcf5-b32ed85f21a0%40googlegroups.com
> <https://groups.google.com/d/msgid/tortoisesvn/475302c0-07e6-4bd9-bcf5-b32ed85f21a0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tortoisesvn/CAHOuc7N_6FgDoRBZett85HgRyMCOxoNKDiLJssAsDkJzaS0r0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to