progress.worked(3);
cancellation.checkCancelled();
File dirstateFile = internalRepo.getRepositoryFile(Dirstate);
try {
FileChannel dirstateFileChannel = new FileOutputStream(dirstateFile).getChannel();
dirstateBuilder.serialize(dirstateFileChannel);
dirstateFileChannel.close();
} catch (IOException ex) {
throw new HgIOException("Can't write down new directory state", ex, dirstateFile);
}
progress.worked(1);