Hi thanks for the replays
I solved this issue by checking changes in my file by using hg diff in my build step. I used execute windows batch command as my build step and the logic is like this
FOR /F "tokens=*" %%i IN ('hg diff -r -1:-2 <file_name>') DO SET X=%%i
SET result=false
IF "%X%" NEQ "" SET result=true
IF "%result%"=="true" (
"commit is in <file_name>, execute the build script for that"
)
IF "%result%" =="false" (
"Commit made on other files..so normal build "
)
where hg diff -r -1:-2 <file_name>
will give me the changes made to my <file_name>
between the current one and one before that