subrepo/svn: cache _wcrev() value in merge() stable
authorPatrick Mezard <patrick@mezard.eu>
Mon, 30 Apr 2012 17:05:19 +0200
branchstable
changeset 16555 4955e7bf085c
parent 16554 ae2664ee0223
child 16556 f9262456fb01
subrepo/svn: cache _wcrev() value in merge()
mercurial/subrepo.py
--- 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):