diff mercurial/dirstate.py @ 1794:98b6c1cad58b

only write the dirstate when something changed
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 23 Feb 2006 02:17:08 +0100
parents a8f7791e3680
children 62647394e368
line wrap: on
line diff
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -213,6 +213,8 @@ class dirstate(object):
         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():