changeset 16468:2fb521d75dc2 stable

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
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Thu, 19 Apr 2012 23:36:42 +0200
parents 7f59900e3f8b
children dd68c972d089
files mercurial/subrepo.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/subrepo.py	Wed Apr 18 21:27:35 2012 -0700
+++ b/mercurial/subrepo.py	Thu Apr 19 23:36:42 2012 +0200
@@ -369,6 +369,8 @@
         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):