mercurial/dirstate.py
changeset 1794 98b6c1cad58b
parent 1755 a8f7791e3680
child 2003 62647394e368
--- a/mercurial/dirstate.py	Wed Feb 22 09:14:46 2006 +0100
+++ b/mercurial/dirstate.py	Thu Feb 23 02:17:08 2006 +0100
@@ -213,6 +213,8 @@
         self.markdirty()
 
     def write(self):
+        if not self.dirty:
+            return
         st = self.opener("dirstate", "w", atomic=True)
         st.write("".join(self.pl))
         for f, e in self.map.items():