int previousRevision = currentRevision - 1;
String[] diffCmd = new String[] {
HgCommandConstants.DIFF_CMD,
HgCommandConstants.REVISION_OPTION,
"" + previousRevision };
HgDiffConsumer diffConsumer = new HgDiffConsumer( getLogger(), workingDir );
ScmResult diffResult = HgUtils.execute( diffConsumer, getLogger(), workingDir, diffCmd );
// Now translate between diff and update file status
List<ScmFile> updatedFiles = new ArrayList<ScmFile>();
List<CharSequence> changes = new ArrayList<CharSequence>();
List<ScmFile> diffFiles = diffConsumer.getChangedFiles();
Map<String, CharSequence> diffChanges = diffConsumer.getDifferences();
for ( ScmFile file : diffFiles )
{
changes.add( diffChanges.get( file.getPath() ) );
if ( file.getStatus() == ScmFileStatus.MODIFIED )
{