comparison mercurial/subrepo.py @ 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 9c431cfdca12
children 17a1f7690b49
comparison
equal deleted inserted replaced
16467:7f59900e3f8b 16468:2fb521d75dc2
367 367
368 def forget(self, ui, match, prefix): 368 def forget(self, ui, match, prefix):
369 return [] 369 return []
370 370
371 def revert(self, ui, substate, *pats, **opts): 371 def revert(self, ui, substate, *pats, **opts):
372 ui.warn('%s: reverting %s subrepos is unsupported\n' \
373 % (substate[0], substate[2]))
372 return [] 374 return []
373 375
374 class hgsubrepo(abstractsubrepo): 376 class hgsubrepo(abstractsubrepo):
375 def __init__(self, ctx, path, state): 377 def __init__(self, ctx, path, state):
376 self._path = path 378 self._path = path