1) -kk option is used with rdiff command to ignore CVS's own variable while comparing files with two diff versions i.e. it just checks changes if there are any in the actual code body (instead of any CVS variable's expanded value within the code's comment area). 2) Value for start.tag and end.tag are coming from a property file i.e. build.properties 3) When I'm removing the above 3 lines, diff reports are generating good but showing files has changes even if the changes are just due to CVS's own variable expansion. 4) cvstagdiff intuns calls rdiff
I don't use CVS, so this is all guesswork. But from reading about the CVS-related tasks in the Ant docs, my guess is that if you give commandline arguments, then they must be the full argument to the cvs task, not just the optional argument for the rdiff function.
Try this, run the cvstagdiff task without any commandline arguments. Run Ant with the -verbose option; Ant should provide the cvs command line it runs. Then add the commandline argument back in, providing all of the arguments, adding the -kk in where it should go.
If this does not help, provide the full command line output for the Ant task, including the Ant command with -verbose.
Do I need to make sure that for seeing only the code differences (actual differences), I have to ask the developer/contributor to use -kk while checking out, and then making his/her change and then commit it. Then I have to use -kk with rdiff command???
I don't see any ant run, or output from an ant run, in your latest post, so I have no idea.
Also, I do not understand this sentence:
Getting this...diff which is only due to $<variable>?$ expansion.
Are you talking about a 'diff' command or did you mean 'rdiff'? And how is that command related to the text "$<variable>?$" and the expansion of that text? (And I don't see "$<variable>?$" anywhere in the following text.) [ September 09, 2008: Message edited by: Peter Johnson ]
Joined: Aug 22, 2008
cvstagdiff is an ANT task which calls rdiff instead of diff. In my build.xml file I'm calling cvstagdiff task which inturns call rdiff command and work on all the repositories (listed under the build.xml file).
I just pasted the output that rdiff command is showing me when I'm using rdiff -kk -r tag1 -r tag2 on that file. The lines have "+" sign as the first character are the lines which got added as a commit onto that file which is just an example of committing a code (not the actual code) but in the commented part which is just a change due to keyword expansion.
I just want to know what option shall i use with RDIFF (I don't have to use DIFF command) command in CVS so that I'll not see that output. the output should be blank as those changes are not CODE changes but only due to keyword expansion.
1. find out the class within the ANT jar files which contain cvstagdiff.
2. see the class using "cavaj" which is opposite of "javac". Its a freeware and unlocks a class into JAVA code.
3. See the .java file which has the entry for cvstagdiff
4. Make changes to the funtion in java code for cvstagdiff. change will be similar to adding a "-kk" option like one of the other option (you'll be able to find it easily if you see the code).
MAKE sure you rename the function as "cvstagdiff1". Javac it again and now you'll get a new class. Put this jar in "ant_custom.jar" and place a copy under ~user/.ant/lib folder where user is a Linux/Unix user who;ll be running a script/call to this
cvstagdiff1 task using a .sh or ANT code
5. Make changes to your ANT build.xml i.e instead of using cvstagdiff it now use: cvstagdiff1
6. you may have to use classpath while calling the main target in your ANT build.xml i.e. ANT should know where it can find cvstagdiff1 ant task.
7. If the above seems like a little difficult for you, just send me an email: firstname.lastname@example.org and i'll help you out. Its very easy.
Now, when I run diff script (shell) which calls ANT code (build.xml), the CVS rdiff command show "-kk" in ANT's verbose output. The diff reports now doesn't show any file where changes happens due to CVS variables only (except for file which has $LOG cvs variable). It's CVS issue that -kk can't ignore $LOG cvs variable)... so if a file has $source $id $date etc then that file will not show as a diff file between two tags/branches but if that file has $LOG, it'll still show in diff reports even if -kk was used.
I have the ant_custom.jar file (containing the java class (cavajed+changed+javaced again) that you can just use. I have the build.xml that you can use for your help.