Mercurial > evolve
diff hgext/evolve.py @ 1409:3276730e4b32
evolve: move the 'update' if '.' is obsolete earlier
A big refactoring of the computation of the revision to evolve is coming. This
case won't be handled by it, so we extract it earlier.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 19 Jun 2015 14:32:54 -0700 |
parents | b3afdc0815d0 |
children | 2c451fece7a6 |
line wrap: on
line diff
--- a/hgext/evolve.py Tue Jun 16 17:56:23 2015 -0700 +++ b/hgext/evolve.py Fri Jun 19 14:32:54 2015 -0700 @@ -1412,6 +1412,18 @@ raise util.Abort(msg) elif len(specifiedcategories) == 1: targetcat = specifiedcategories[0] + elif repo['.'].obsolete(): + displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) + # no args and parent is obsolete, update to successors + try: + ctx = repo[_singlesuccessor(repo, repo['.'])] + except MultipleSuccessorsError, exc: + repo.ui.write_err('parent is obsolete with multiple successors:\n') + for ln in exc.successorssets: + for n in ln: + displayer.show(repo[n]) + return 2 + ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') troubled = set(repo.revs('troubled()'))