Added the hasClanges() API function to test whether a working copy is dirty.