# HG changeset patch # User Angel Ezquerra # Date 2012-04-19 21:36:42 # Node ID 2fb521d75dc253c60e85699452a80e699b5f2566 # Parent 7f59900e3f8bd99877ca150bbd0cfc2d0c2e32b4 revert: show warning when reverting subrepos that do not support revert The warning is similar to the warning that was shown before hgsubrepo revert support was added, with the exception that now the subrepo type is shown. For example, when trying to revert a git subrepo located in "include/mygitsub", the warning message would be: include/mygitsub: reverting git subrepos is unsupported diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -369,6 +369,8 @@ class abstractsubrepo(object): return [] def revert(self, ui, substate, *pats, **opts): + ui.warn('%s: reverting %s subrepos is unsupported\n' \ + % (substate[0], substate[2])) return [] class hgsubrepo(abstractsubrepo):