TortoiseMerge recognising some file as binary?

1,795 views
Skip to first unread message

Jean-Francois Cote

unread,
Dec 14, 2011, 9:22:44 AM12/14/11
to us...@tortoisesvn.tigris.org
Hello,

I'm proposing this as a bug since I didn't find any reason for TortoiseMerge to do that. This has been tested using TortoiseSVN 1.7.2 (Latest version)

Steps:
-Click on a file, do "Show Log"
-Click on 2 particular revisions, in my case revision 107720 and 107623 and do "Compare Revision"
-TortoiseMerge will open and show a message "The file C:\Users\username\AppData\Local\Temp\chcon-rev107623.svn001.tmp.cpp is not a valid text file! Note that UTF32 files are treated as binary too."

This happend with some of the revision of this file, some not. I didn't find a pattern. This file is a valid text file. The file in the temp file is a normal ANSI c++ files.

More information:
-I tried the same steps using WinMerge plugin instead of TortoiseMerge (In visual studio 2010) and there is no problem, so it must be in TortoiseMerge.
-Strangely, the "Blame Revision" on the same 2 revisions works and it seems to use TortoiseMerge in the same way.
-Unified diff works too.

If you want any other information, just let me know. The only thing I can't provide is the code itself since it's confidential.

Thanks!

Jean-François Côté, ing.
Aqua Data inc.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893246

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Oto BREZINA

unread,
Dec 14, 2011, 10:25:42 AM12/14/11
to us...@tortoisesvn.tigris.org
On 2011-12-14 15:22, Jean-Francois Cote wrote:
> Hello,
>
> I'm proposing this as a bug since I didn't find any reason for TortoiseMerge to do that. This has been tested using TortoiseSVN 1.7.2 (Latest version)
>
> Steps:
> -Click on a file, do "Show Log"
> -Click on 2 particular revisions, in my case revision 107720 and 107623 and do "Compare Revision"
> -TortoiseMerge will open and show a message "The file C:\Users\username\AppData\Local\Temp\chcon-rev107623.svn001.tmp.cpp is not a valid text file! Note that UTF32 files are treated as binary too."
Can you check what is file
C:\Users\username\AppData\Local\Temp\chcon-rev107623.svn001.tmp.cpp when
you get error?

> This happend with some of the revision of this file, some not. I didn't find a pattern. This file is a valid text file. The file in the temp file is a normal ANSI c++ files.

When it happen with one revisions combination does it happen always for
that pair?


> More information:
> -I tried the same steps using WinMerge plugin instead of TortoiseMerge (In visual studio 2010) and there is no problem, so it must be in TortoiseMerge.
> -Strangely, the "Blame Revision" on the same 2 revisions works and it seems to use TortoiseMerge in the same way.
> -Unified diff works too.
>
> If you want any other information, just let me know. The only thing I can't provide is the code itself since it's confidential.

Can you check if that problem expose also on TSVN on other public
repository ?


> Thanks!
>
> Jean-François Côté, ing.
> Aqua Data inc.

--
Oto BREZINA

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893261

Jean-Francois Cote

unread,
Dec 14, 2011, 1:58:06 PM12/14/11
to us...@tortoisesvn.tigris.org
1) Can you check what is file C:\Users\username​AppData\Local\Tem​p\chcon-rev107623.s​vn001.tmp.cpp when you get error?

This file seems to be containing the complete source file for this revision. I can open it with any text editor and Notepad++ is telling me that it's in ANSI format. There is not binary code.

2) When it happen with one revisions combination does it happen always for that pair?

Yes. In fact, it seems that it's not the pair that is "corrupted" but only one of the two revision. In my previous example, the revision that can't compare with anyone is 107623

3) Can you check if that problem expose also on TSVN on other public repository ?

I'm not sure to understand this question so I will need more information. In fact, this is on our private repository and it's the first time this is happening in a file history but I can't confirm if it's the only that is doing this...

Thank and let me know if you need more information

Jean-François Côté, ing.
Aqua Data inc.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893312

Stefan Küng

unread,
Dec 14, 2011, 2:52:56 PM12/14/11
to us...@tortoisesvn.tigris.org
On 14.12.2011 19:58, Jean-Francois Cote wrote:
> 1) Can you check what is file C:\Users\username​AppData\Local\Tem​p\chcon-rev107623.s​vn001.tmp.cpp when you get error?
>
> This file seems to be containing the complete source file for this revision. I can open it with any text editor and Notepad++ is telling me that it's in ANSI format. There is not binary code.

Can you check that file in a hex editor and see if it contains double
null chars?

Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893332

Oto BREZINA

unread,
Dec 14, 2011, 3:18:12 PM12/14/11
to us...@tortoisesvn.tigris.org
On 2011-12-14 19:58, Jean-Francois Cote wrote:
> 1) Can you check what is file C:\Users\username​AppData\Local\Tem​p\chcon-rev107623.s​vn001.tmp.cpp when you get error?
>
> This file seems to be containing the complete source file for this revision. I can open it with any text editor and Notepad++ is telling me that it's in ANSI format. There is not binary code.
If file contains two consequenced nul chars it is threaded as binary.
You can use hex viewer/editor to check that.
I would guess that downloading that revision (e.g. update to revision),
making change, and trying to diff with T-Merge would lead to error. This
would means that file revison is recognized as binary.

> 2) When it happen with one revisions combination does it happen always for that pair?
>
> Yes. In fact, it seems that it's not the pair that is "corrupted" but only one of the two revision. In my previous example, the revision that can't compare with anyone is 107623
>
> 3) Can you check if that problem expose also on TSVN on other public repository ?
>
> I'm not sure to understand this question so I will need more information. In fact, this is on our private repository and it's the first time this is happening in a file history but I can't confirm if it's the only that is doing this...
I was asking if you can find that error in
https://tortoisesvn.googlecode.com/svn/trunk repository log. But this
request is based on expectation that it is bug in TSVN, while as you
have problem with one revision I would focus on that revision of file
(see point 1).

--
Oto BREZINA

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893334

Jean-Francois Cote

unread,
Dec 15, 2011, 8:41:53 AM12/15/11
to us...@tortoisesvn.tigris.org
> Can you check that file in a hex editor and see if it contains double
> null chars?

I've downloaded an HEX editor and check the file. At the end of the problematic file, there is 48 NULL char... In the revision just after this one, there is none. The 10 revisions before have the same number of NULL char. And before that, they doesn't have. And then one day it reappear...

So my question are:
1) Is this a problem with our server that could have generated this? Because the revision were done by a lot of different programmer on different computers so I'm pretty sure it's not one particular computer who generate this.

2) Why does tortoise recognise this as a binary file when all the other editor are able to open it and even do the diff (WinMerge)?

Thanks


Jean-François Côté, ing.
Aqua Data inc.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893568

Simon Large

unread,
Dec 15, 2011, 8:50:35 AM12/15/11
to us...@tortoisesvn.tigris.org
On 15 December 2011 13:41, Jean-Francois Cote <jfc...@aquadata.com> wrote:
>> Can you check that file in a hex editor and see if it contains double
>> null chars?
>
>  I've downloaded an HEX editor and check the file. At the end of the problematic file, there is 48 NULL char... In the revision just after this one, there is none. The 10 revisions before have the same number of NULL char. And before that, they doesn't have. And then one day it reappear...
>
> So my question are:
> 1) Is this a problem with our server that could have generated this? Because the revision were done by a lot of different programmer on different computers so I'm pretty sure it's not one particular computer who generate this.

It is unlikely to be the subversion server. Files are stored as binary
and if it added data to the end randomly it would be a truly broken
revision control system.

More likely one of your programmers has an unfriendly editor which
does this and everyone else has editors that leave the file as they
find it. If you find the revision where the nulls re-appear and find
who made that commit then you may find out what is causing this.

> 2) Why does tortoise recognise this as a binary file when all the other editor are able to open it and even do the diff (WinMerge)?

I'll leave that one to Stefan ...

Simon

--
:       ___
:  oo  // \\      "De Chelonian Mobile"
: (_,\/ \_/ \     TortoiseSVN
:   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
:   /_/   \_\     http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893571

Felix Saphir

unread,
Dec 15, 2011, 8:51:01 AM12/15/11
to us...@tortoisesvn.tigris.org
Am 15.12.2011 14:41, schrieb Jean-Francois Cote:
>
> I've downloaded an HEX editor and check the file. At the end of the
> problematic file, there is 48 NULL char... In the revision just after
> this one, there is none. The 10 revisions before have the same number
> of NULL char. And before that, they doesn't have. And then one day it
> reappear...
>
> So my question are: 1) Is this a problem with our server that could
> have generated this? Because the revision were done by a lot of
> different programmer on different computers so I'm pretty sure it's
> not one particular computer who generate this.

We don't know anything about your server, but that's still unlikely by
statistics. Do you perhaps use a fancy IDE or have some unusual setup?


> 2) Why does tortoise recognise this as a binary file when all the
> other editor are able to open it and even do the diff (WinMerge)?

Because TortoiseMerge tries to do the Right Thing (TM): Text files
usually don't contain ASCII NUL.

Felix

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893572

Jean-Francois Cote

unread,
Dec 15, 2011, 10:04:57 AM12/15/11
to us...@tortoisesvn.tigris.org
> Do you perhaps use a fancy IDE or have some unusual setup?

At the time of the revision, we were using Visual Studio 2005 and we are now using Visual Studio 2010.


> Because TortoiseMerge tries to do the Right Thing (TM): Text files
> usually don't contain ASCII NUL.

I didn't know that but that make sence. I will have a close look on history that do this problem but there are good chance it will not happend a lot.

I'm happy it's not a bug.

Thanks for your kind help!

Jean-François Côté, ing.
Aqua Data inc.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2893586

Reply all
Reply to author
Forward
0 new messages