Patchwork [1,of,2,default-dest] update: "deprecate" call to 'merge.update' without a destination

mail settings
Submitter Pierre-Yves David
Date Oct. 15, 2015, 12:05 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/11089/
State Accepted
Headers show


Pierre-Yves David - Oct. 15, 2015, 12:05 a.m.
# HG changeset patch
# User Pierre-Yves David <>
# Date 1444106529 25200
#      Mon Oct 05 21:42:09 2015 -0700
# Node ID f005ccc592ba7bff1232c2f07061a0909d1d1496
# Parent  07db7e95c464537aeb2dd7aba39de0813eaffd04
# EXP-Topic defaultdest
# Available At
#              hg pull -r f005ccc592ba
update: "deprecate" call to 'merge.update' without a destination

Now that all internal caller pre-compute and set a destination at a higher level
it feel like we can kill this API. This will allow use 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


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -1078,10 +1078,13 @@  def update(repo, node, branchmerge, forc
         pas = [None]
         if ancestor is not None:
             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()
         overwrite = force and not branchmerge