View Full Version : incorrect filename using file-report
pcloves
12-Oct-2011, 10:28 AM
English is not my mother tongue, please forgive my poor english.
i have a batch file as follows(mybat.bat):
d:\BC3\BComp.exe "@d:\BC3\script_patch.txt" "%6" /title1=%3 "%7" /title2=%5 d:\temp.txt /silent
type d:\temp.txt >> d:\all.txt
script.txt contain:
text-report layout:patch options:patch-unified output-to:%3 %1 %2
then, i use the command as follows to generate the report
svn diff --diff-cmd d:\BC3\mybat.bat d:\dj186_3 -r 2345:2346
d:\dj186_3 is a local working copy, this command works well, but there is a problem. if you open the all.txt file, you will find there are some lines like this:
--- C:\Documents and Settings\Administrator\Local Settings\Temp\svn-C82647C4 2011-10-12 22:10:10.000000000 +0800
+++ C:\Documents and Settings\Administrator\Local Settings\Temp\svn-C82647C8 2011-10-12 22:10:10.000000000 +0800
“svn-C82647C4” and "svn-C82647C8" are incorrect filename. Is there any way to generate the report that contains correct filename?
Aaron
12-Oct-2011, 04:42 PM
Hello,
The /title parameters are used for the graphical interface titlebars, but not the file names as reported when generated from script.
BC Scripting's text-report does have a title: option that can be used to give the report an overall title, that can be passed from the command line as plain text, such as:
bcompare.exe "@c:\script.txt" "file1.txt" "file2.txt" "report.txt" "Report Title Here: File Name1 <> File Name 2"
Which, in this example would be "%4" when referenced in scripting.
pcloves
12-Oct-2011, 08:49 PM
Hello,
The /title parameters are used for the graphical interface titlebars, but not the file names as reported when generated from script.
BC Scripting's text-report does have a title: option that can be used to give the report an overall title, that can be passed from the command line as plain text, such as:
bcompare.exe "@c:\script.txt" "file1.txt" "file2.txt" "report.txt" "Report Title Here: File Name1 <> File Name 2"
Which, in this example would be "%4" when referenced in scripting.
Hi, Aaron, thanks for your quickly replying.
In fact, when i change the batch as follows:
d:\BC3\BComp.exe "@d:\BC3\script_patch.txt" %6 %7 d:\temp.txt /silent
type d:\temp.txt >> d:\all.txt
the generated patch files contains the incorrect filename as well.
%6 and %7 are passed from the command line(svn diff). I guess svn download the two files that to be compared to the temporary dictionary, and passed the wrong filenameto BC3, which is temporary, such as “svn-C82647C4” and "svn-C82647C8". So, the report generated by BC3 contains wrong filename(the correct filename should be the name of two files be compared).
So, would you tell me the correct solution directly? It is very hard for me to express my question and get your words.
i don't know whether i express what i want to say because of my poor english, please forgive me again.
Aaron
13-Oct-2011, 01:54 PM
Hello,
No problem, I'll try to help explain again. The issue is that the script does not have a parameter to override the temp file names.
Instead, use:
d:\BC3\BComp.exe "@d:\BC3\script_patch.txt" %6 %7 d:\temp.txt "Report Title: %3 <> %5" /silent
and in script_patch.txt use:
text-report layout:patch options:patch-unified title:"%4" output-to:"%3" "%1" "%2"
pcloves
14-Oct-2011, 05:51 AM
hello, Aaron.
I am sorry to bother you so many times, but i have not got process.
I used your script as you replied, it can work, but the problem sitll exists. Let me show you the patch report gengeated by BC3:
http://www.scootersoftware.com/vbulletin/attachment.php?attachmentid=841&stc=1&d=1318591734
and the XML report:
http://www.scootersoftware.com/vbulletin/attachment.php?attachmentid=842&stc=1&d=1318591734
It seems that the title parameter does not work.
I have tested the "title" parameter, the script.txt contains:
file-report layout:patch options:patch-unified title:"Report Title" output-to:D:\temp.xml D:\BeyondCompare3\1.txt D:\BeyondCompare3\2.txt
the generated “temp.txt” report is:
http://www.scootersoftware.com/vbulletin/attachment.php?attachmentid=843&stc=1&d=1318592649
in the image above, i could not find the words "Report Title", so how to use the parameter "title"? what's the purpose of it?
Looking forward to your reply. It's very very thanks to you.
ps:sometimes, the report contains disorder code as shown in the second and third image above.
Aaron
14-Oct-2011, 03:52 PM
Hello,
Sorry about that. I re-tested the patch report type and title: is not used for that report style. You would need to switch to one of the other layouts (side-by-side) to see the effect. I must have been mistaken for my original test.
I do not think we have a workaround for you at this time. I'll open a tracker entry to see if we can come up with an enhancement to help handle this.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.