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
This commit is contained in:
Jun Wu 2019-08-22 12:57:45 -07:00 committed by Facebook Github Bot
parent a6ad29eadf
commit 0668c348e3

View File

@ -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"