From 0668c348e373306e92c9ea98c7fa16df572452e4 Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Thu, 22 Aug 2019 12:57:45 -0700 Subject: [PATCH] amend/movement: disable revnum warning for internal use of rebase Summary: This removes a false positive detection of "revision number" usage. Reviewed By: singhsrb Differential Revision: D16955291 fbshipit-source-id: b9d37dc4c18c438dc64e25f5aa4e8e72155da0bd --- edenscm/hgext/amend/common.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/edenscm/hgext/amend/common.py b/edenscm/hgext/amend/common.py index 07d44a29ca..c53b1e030b 100644 --- a/edenscm/hgext/amend/common.py +++ b/edenscm/hgext/amend/common.py @@ -71,10 +71,11 @@ def restackonce( rebaseopts["dest"] = rev rebaseopts["noconflict"] = noconflict - # We need to ensure that the 'operation' field in the obsmarker metadata - # is always set to 'rebase', regardless of the current command so that - # the restacked commits will appear as 'rebased' in smartlog. - overrides = {} + overrides = { + # Explicitly disable revnum deprecation warnings. This is an internal + # use of "rebase" that does not contain user-provided revsets. + ("devel", "legacy.revnum"): "" + } try: tweakdefaults = extensions.find("tweakdefaults") except KeyError: @@ -82,6 +83,9 @@ def restackonce( # to set the metadata. pass else: + # We need to ensure that the 'operation' field in the obsmarker metadata + # is always set to 'rebase', regardless of the current command so that + # the restacked commits will appear as 'rebased' in smartlog. overrides[ (tweakdefaults.globaldata, tweakdefaults.createmarkersoperation) ] = "rebase"