update: "deprecate" call to 'merge.update' without a destination
authorPierre-Yves David <pierre-yves.david@fb.com>
Mon, 05 Oct 2015 21:42:09 -0700
changeset 26682 08b068240a1a
parent 26681 ca8170b5d370
child 26683 634666c48b7d
update: "deprecate" call to 'merge.update' without a destination Now that all internal callers pre-compute and set a destination at a higher level it feels like we can kill this API. This will allow us to simplify this function. However I feel like this is a bit too central and critical to break now. I'm adding a devel warning to let extension make catch this in the next cycle.
mercurial/merge.py
--- a/mercurial/merge.py	Wed Oct 14 20:35:06 2015 -0700
+++ b/mercurial/merge.py	Mon Oct 05 21:42:09 2015 -0700
@@ -1080,6 +1080,9 @@
             pas = [repo[ancestor]]
 
         if node is None:
+            if (repo.ui.configbool('devel', 'all-warnings')
+                    or repo.ui.configbool('devel', 'oldapi')):
+                repo.ui.develwarn('update with no target')
             rev, _mark, _act = destutil.destupdate(repo)
             node = repo[rev].node()