Double/more log info in the changed files

Dec 9, 2013 at 8:30 PM
Edited Dec 9, 2013 at 8:36 PM
I followed the steps to recompile and install the policy in vs2012, all work fine, but there's a big issue.

Every time change a file's content and then refresh the "Pending Changes" page (just switch back from other pages), it will execute the IPolicyEvaluation, in which if there's no comment, it works fine; if there's comment, the code will jump to the FillCommentInSourceFile(proposedComment, pc.LocalItem, pc) to write info into the file; a pop window says that the file is changed out of editor, reload it?. When checkin, it will execute the IPolicyEvaluation another time, then the same info (except for Date) will be write into the file again! How many times does the Pending Changes Page refresh, there will be same numbers of same change info into the file! It doesn't work, even click NO when refresh back.

Try to use the CurrentCommand to judge only if it's CheckIn command, then run the FillCommentInSourceFile, but the return command is empty. Donna how to do.

string command= pc.VersionControlServer.CurrentCommand;