Can we automatically recognize when we should be fulfilling our deprecation promsie?

timeless timeless at gmail.com
Wed Nov 23 04:35:07 UTC 2016


Augie Fackler wrote:
> We said we'd delete this after 3.8. It's time.
> -        ui.deprecwarn("missing attribute '%s', use @command decorator "
> -                      "to register '%s'" % (attr, cmd), '3.8')

It feels like we should be able to have a test which complains if we
have deprecwarns for version X and our version is > X.

Offhand, I think it should probably be of the form:

$ magic $(hg version)
found the following deprecation warnings which are acceptable as of 4.0:
...

When $(hg version) changes to 4.1, the output would change to only
list items expiring after 4.1, thus changing the output, and any
things that are from 4.0 but wouldn't be tolerated by 4.1 wouldn't be
printed, and would thus disappear from the output and trigger a test
failure.


More information about the Mercurial-devel mailing list