Mercurial > evolve
comparison hgext/evolve.py @ 1487:ee5391999f2d stable
next: properly report no children when --evolve is used
If no aspiring children exist, 'hg next --evolve' should properly issue an error
message instead of crashing.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 10 Aug 2015 00:41:18 -0700 |
parents | fa1a27009c76 |
children | 3dec62fc266e 5c962163f77a |
comparison
equal
deleted
inserted
replaced
1486:e8ebb2441e60 | 1487:ee5391999f2d |
---|---|
2061 displayer.show(c) | 2061 displayer.show(c) |
2062 ui.warn(_('explicitly update to one of them\n')) | 2062 ui.warn(_('explicitly update to one of them\n')) |
2063 result = 1 | 2063 result = 1 |
2064 else: | 2064 else: |
2065 aspchildren = _aspiringchildren(repo, [repo['.'].rev()]) | 2065 aspchildren = _aspiringchildren(repo, [repo['.'].rev()]) |
2066 if not opts['evolve']: | 2066 if not opts['evolve'] or not aspchildren: |
2067 ui.warn(_('no children\n')) | 2067 ui.warn(_('no children\n')) |
2068 if aspchildren: | 2068 if aspchildren: |
2069 msg = _('(%i unstable changesets to be evolved here, ' | 2069 msg = _('(%i unstable changesets to be evolved here, ' |
2070 'do you want --evolve?)\n') | 2070 'do you want --evolve?)\n') |
2071 ui.warn(msg % len(aspchildren)) | 2071 ui.warn(msg % len(aspchildren)) |