--- a/hgext/evolve.py Thu Mar 17 11:25:01 2016 -0700
+++ b/hgext/evolve.py Thu Mar 17 11:31:55 2016 -0700
@@ -2100,8 +2100,14 @@
raise
parents = wparents[0].parents()
+ topic = getattr(repo, 'currenttopic', '')
+ if topic and not opts.get("no_topic", False):
+ parents = [ctx for ctx in parents if ctx.topic() == topic]
displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
- if len(parents) == 1:
+ if not parents:
+ ui.warn(_('no parent in topic "%s"\n') % topic)
+ ui.warn(_('(do you want --no-topic)\n'))
+ elif len(parents) == 1:
p = parents[0]
bm = bmactive(repo)
shouldmove = opts.get('move_bookmark') and bm is not None
@@ -2138,6 +2144,7 @@
_('move active bookmark after update')),
('', 'merge', False, _('bring uncommitted change along')),
('', 'evolve', False, _('evolve the next changeset if necessary')),
+ ('', 'no-topic', False, _('ignore topic and move topologically')),
('n', 'dry-run', False,
_('do not perform actions, just print what would be done'))],
'[OPTION]...')