Mercurial > evolve
diff hgext/evolve.py @ 1099:bac4e0bc9f6a stable
evolve: write a status message when the working directory changes
Evolve changes the working directory during atop, etc which can confuse people
as they are not aware that this happend. The ideal solution is to not have
evolve change it, however mercurial limitations don't allow us to do that at the
moment. So instead we are printing a status message that the working directory
changed.
author | David Soria Parra <davidsp@fb.com> |
---|---|
date | Fri, 29 Aug 2014 14:26:17 +0200 |
parents | 5d063fed9e3d |
children | 8cac667a0d7d |
line wrap: on
line diff
--- a/hgext/evolve.py Fri Aug 29 09:29:02 2014 +0200 +++ b/hgext/evolve.py Fri Aug 29 14:26:17 2014 +0200 @@ -1239,6 +1239,8 @@ confirmopt = opts['confirm'] ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') + startnode = repo['.'] + if contopt: if anyopt: raise util.Abort('cannot specify both "--any" and "--continue"') @@ -1282,7 +1284,10 @@ print 'hg update %s' % ctx.rev() return 0 else: - return hg.update(repo, ctx.rev()) + res = hg.update(repo, ctx.rev()) + if ctx != startnode: + ui.status(_('working directory is now at %s\n') % ctx) + return res troubled = repo.revs('troubled()') if troubled: @@ -1315,6 +1320,8 @@ progresscb() seen += 1 if not allopt: + if repo['.'] != startnode: + ui.status(_('working directory is now at %s\n') % repo['.']) return result progresscb() tro = _picknexttroubled(ui, repo, anyopt or allopt) @@ -1322,6 +1329,9 @@ if allopt: ui.progress('evolve', None) + if repo['.'] != startnode: + ui.status(_('working directory is now at %s\n') % repo['.']) + def _evolveany(ui, repo, tro, dryrunopt, confirmopt, progresscb): repo = repo.unfiltered()