comparison hgext/evolve.py @ 1443:6c122c975125

evolve: add a hint when the parent working copy become obsolete This should help people find the right commands to recover from this situation.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 24 Jun 2015 16:37:02 -0700
parents 6a219f8089f9
children a73d1ee48003
comparison
equal deleted inserted replaced
1442:6a219f8089f9 1443:6c122c975125
683 def wrapmayobsoletewc(origfn, ui, repo, *args, **opts): 683 def wrapmayobsoletewc(origfn, ui, repo, *args, **opts):
684 """Warn that the working directory parent is an obsolete changeset""" 684 """Warn that the working directory parent is an obsolete changeset"""
685 def warnobsolete(): 685 def warnobsolete():
686 if repo['.'].obsolete(): 686 if repo['.'].obsolete():
687 ui.warn(_('working directory parent is obsolete!\n')) 687 ui.warn(_('working directory parent is obsolete!\n'))
688 if (not ui.quiet) and obsolete.isenabled(repo, commandopt):
689 ui.warn(_('(use "hg evolve" to update to its successor)\n'))
688 wlock = None 690 wlock = None
689 try: 691 try:
690 wlock = repo.wlock() 692 wlock = repo.wlock()
691 repo._afterlock(warnobsolete) 693 repo._afterlock(warnobsolete)
692 res = origfn(ui, repo, *args, **opts) 694 res = origfn(ui, repo, *args, **opts)