mercurial/merge.py
changeset 19929 ab2362e1672e
parent 19803 0f64af33fb63
child 19951 d51c4d85ec23
--- a/mercurial/merge.py	Thu Oct 17 21:45:17 2013 +0900
+++ b/mercurial/merge.py	Tue Oct 01 17:43:54 2013 -0700
@@ -719,6 +719,12 @@
                                        "subrepository '%s'") % s)
 
         elif not overwrite:
+            if p1 == p2: # no-op update
+                # call the hooks and exit early
+                repo.hook('preupdate', throw=True, parent1=xp2, parent2='')
+                repo.hook('update', parent1=xp2, parent2='', error=0)
+                return 0, 0, 0, 0
+
             if pa not in (p1, p2):  # nolinear
                 dirty = wc.dirty(missing=True)
                 if dirty or onode is None: