changeset 16555:4955e7bf085c stable

subrepo/svn: cache _wcrev() value in merge()
author Patrick Mezard <patrick@mezard.eu>
date Mon, 30 Apr 2012 17:05:19 +0200
parents ae2664ee0223
children f9262456fb01
files mercurial/subrepo.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Mon Apr 30 17:03:15 2012 +0200
+++ b/mercurial/subrepo.py	Mon Apr 30 17:05:19 2012 +0200
@@ -802,9 +802,10 @@
     def merge(self, state):
         old = self._state[1]
         new = state[1]
-        if new != self._wcrev():
-            dirty = old == self._wcrev() or self._wcchanged()[0]
-            if _updateprompt(self._ui, self, dirty, self._wcrev(), new):
+        wcrev = self._wcrev()
+        if new != wcrev:
+            dirty = old == wcrev or self._wcchanged()[0]
+            if _updateprompt(self._ui, self, dirty, wcrev, new):
                 self.get(state, False)
 
     def push(self, opts):