diffmerge command line execution is failing

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
jicman
Posts: 6
Joined: Thu Feb 21, 2008 10:08 am
Location: Rochester, NY

diffmerge command line execution is failing

Post by jicman » Thu Feb 21, 2008 10:26 am

Greetings.

I am running this command on my DOS prompt:

diffmerge /d=c:\temp\diff\907-trans-vs-vali.txt c:\temp\diff\trans\file.txt c:\temp\diff\vali\file.txt

and the file c:\temp\diff\907-trans-vs-vali.txt gets created, but there is no data in it. When I run this same project using the GUI interface, it gives me what I want. Is there an option or something that I am missing on the command line?

thanks,

josé

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

The diff file will contain on the differences.

Post by jeffhostetler » Thu Feb 21, 2008 1:52 pm

No, there aren't any other options or things to tweak.

The diff file will only contain the differences between
the 2 input files. it will not contain the complete contents
of the input files. the output should resemble gnu diff
output.

and it is only written when there are differences (and
the program exits with non-zero status).

are there differences shown in the file when you use
the gui?

it is possible that there may be a character encoding
issue when the results are written out. what is the
character encoding of the input files?

j

jicman
Posts: 6
Joined: Thu Feb 21, 2008 10:08 am
Location: Rochester, NY

Re: The diff file will contain on the differences.

Post by jicman » Thu Feb 21, 2008 2:52 pm

jeffhostetler wrote:No, there aren't any other options or things to tweak.

The diff file will only contain the differences between
the 2 input files. it will not contain the complete contents
of the input files. the output should resemble gnu diff
output.
Hmm... ok.
jeffhostetler wrote:and it is only written when there are differences (and
the program exits with non-zero status).
This is also ok, so it should write something to the file.
jeffhostetler wrote:are there differences shown in the file when you use
the gui?
Yes. The problem is that the lines are very long and since the display does not wrap, I can not see the parts where it is displaying the changes.
jeffhostetler wrote:it is possible that there may be a character encoding
issue when the results are written out. what is the
character encoding of the input files?
Unicode. I did run a gnu diff on it and I got the differences from there, but not from DiffMerge.

thanks.

josé

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

There a bug.

Post by jeffhostetler » Thu Feb 21, 2008 4:44 pm

i just did what you described on unicode files and
got the same problem. there's a problem converting
the diff results (from unicode) into the gnu diff format.

sorry for the inconvenience,
j

jicman
Posts: 6
Joined: Thu Feb 21, 2008 10:08 am
Location: Rochester, NY

Re: There a bug.

Post by jicman » Thu Feb 21, 2008 4:51 pm

jeffhostetler wrote:i just did what you described on unicode files and
got the same problem. there's a problem converting
the diff results (from unicode) into the gnu diff format.

sorry for the inconvenience,
j
Ok, at least I know it is not just me. .-) If you do a diff -al file1 file2 > file3, you will get some output, but it will all be with an extra space on it. Those lovely \000 values that Windows think that each character has. So, what I do is that I go and clean that file by deleting all \000 values in the text file and I get a good output.

just a thought...

josé

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

a suggestion

Post by jeffhostetler » Fri Feb 22, 2008 8:42 am

if you have cygwin installed, you might run both of the input
files through iconv and convert unicode to utf8 or the code page for
your current locale. then run those files through DiffMerge or gnu
diff.

hope this helps,
j

jicman
Posts: 6
Joined: Thu Feb 21, 2008 10:08 am
Location: Rochester, NY

Re: a suggestion

Post by jicman » Fri Feb 22, 2008 8:54 am

jeffhostetler wrote:if you have cygwin installed, you might run both of the input
files through iconv and convert unicode to utf8 or the code page for
your current locale. then run those files through DiffMerge or gnu
diff.

hope this helps,
j
Yes, I have cygwin installed and I did not know about iconv. I just wrote a D program to convert from unicode to UTF8. Son-o-vah!

Thanks.

Post Reply