diff mercurial/exchange.py @ 33752:ab0c55c2ad9a

context: rename troubles into instabilities Rename troubles context method into instabilities. Copy the old troubles method and add a deprecation warning. This way extensions calling troubles will see the deprecation warning but will not break due to new return values. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D238
author Boris Feld <boris.feld@octobus.net>
date Wed, 02 Aug 2017 18:34:39 +0200
parents 033484935391
children 52c5ff856b49
line wrap: on
line diff
--- a/mercurial/exchange.py	Tue Aug 08 17:25:38 2017 -0700
+++ b/mercurial/exchange.py	Wed Aug 02 18:34:39 2017 +0200
@@ -681,7 +681,9 @@
                 if ctx.obsolete():
                     raise error.Abort(mso % ctx)
                 elif ctx.troubled():
-                    raise error.Abort(mst[ctx.troubles()[0]] % ctx)
+                    # TODO print more than one instability in the abort
+                    # message
+                    raise error.Abort(mst[ctx.instabilities()[0]] % ctx)
 
         discovery.checkheads(pushop)
     return True