commit: drop unneeded dirstate invalidate logic
authorMatt Mackall <mpm@selenic.com>
Mon, 18 May 2009 17:36:24 -0500
changeset 8502 51b7d2a68e03
parent 8501 ab0e3f7ea315
child 8503 90f86a5330bb
commit: drop unneeded dirstate invalidate logic We no longer touch the dirstate in the middle of a commit, so a failing commit doesn't require invalidating the dirstate.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon May 18 17:36:24 2009 -0500
+++ b/mercurial/localrepo.py	Mon May 18 17:36:24 2009 -0500
@@ -769,7 +769,6 @@
 
     def commit(self, files=None, text="", user=None, date=None, match=None,
                force=False, editor=False, extra={}):
-        ret = None
         wlock = self.wlock()
         try:
             p1, p2 = self.dirstate.parents()
@@ -824,8 +823,6 @@
             return ret
 
         finally:
-            if ret == None:
-                self.dirstate.invalidate() # didn't successfully commit
             wlock.release()
 
     def commitctx(self, ctx, error=False):