changeset 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 83c6d8355909
children 36e19e3da12d
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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():