2098 except error.Abort as exc: |
2098 except error.Abort as exc: |
2099 exc.hint = _('do you want --merge?') |
2099 exc.hint = _('do you want --merge?') |
2100 raise |
2100 raise |
2101 |
2101 |
2102 parents = wparents[0].parents() |
2102 parents = wparents[0].parents() |
|
2103 topic = getattr(repo, 'currenttopic', '') |
|
2104 if topic and not opts.get("no_topic", False): |
|
2105 parents = [ctx for ctx in parents if ctx.topic() == topic] |
2103 displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) |
2106 displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) |
2104 if len(parents) == 1: |
2107 if not parents: |
|
2108 ui.warn(_('no parent in topic "%s"\n') % topic) |
|
2109 ui.warn(_('(do you want --no-topic)\n')) |
|
2110 elif len(parents) == 1: |
2105 p = parents[0] |
2111 p = parents[0] |
2106 bm = bmactive(repo) |
2112 bm = bmactive(repo) |
2107 shouldmove = opts.get('move_bookmark') and bm is not None |
2113 shouldmove = opts.get('move_bookmark') and bm is not None |
2108 if dryrunopt: |
2114 if dryrunopt: |
2109 ui.write(('hg update %s;\n' % p.rev())) |
2115 ui.write(('hg update %s;\n' % p.rev())) |
2136 @command('^next', |
2142 @command('^next', |
2137 [('B', 'move-bookmark', False, |
2143 [('B', 'move-bookmark', False, |
2138 _('move active bookmark after update')), |
2144 _('move active bookmark after update')), |
2139 ('', 'merge', False, _('bring uncommitted change along')), |
2145 ('', 'merge', False, _('bring uncommitted change along')), |
2140 ('', 'evolve', False, _('evolve the next changeset if necessary')), |
2146 ('', 'evolve', False, _('evolve the next changeset if necessary')), |
|
2147 ('', 'no-topic', False, _('ignore topic and move topologically')), |
2141 ('n', 'dry-run', False, |
2148 ('n', 'dry-run', False, |
2142 _('do not perform actions, just print what would be done'))], |
2149 _('do not perform actions, just print what would be done'))], |
2143 '[OPTION]...') |
2150 '[OPTION]...') |
2144 def cmdnext(ui, repo, **opts): |
2151 def cmdnext(ui, repo, **opts): |
2145 """update to next child revision |
2152 """update to next child revision |