Patchwork D9110: updaterepo: add deprecation warning

login
register
mail settings
Submitter phabricator
Date Sept. 28, 2020, 3:55 p.m.
Message ID <differential-rev-PHID-DREV-zm4giyf4jf4vayenismi-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47325/
State Superseded
Headers show

Comments

phabricator - Sept. 28, 2020, 3:55 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We just moved all in-tree callers off of the function, but we're
  leaving it here for a bit to help extension writers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9110

AFFECTED FILES
  mercurial/hg.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -1049,6 +1049,10 @@ 
     When overwrite is set, changes are clobbered, merged else
 
     returns stats (see pydoc mercurial.merge.applyupdates)"""
+    repo.ui.deprecwarn(
+        b'prefer merge.update() or merge.clean_update() over hg.updaterepo()',
+        b'5.7',
+    )
     return mergemod._update(
         repo,
         node,