prev: retrieve the 'no-topic' result is a clear and reusable option
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 14 Jul 2017 02:41:53 +0200
changeset 2743 2fe562f94ead
parent 2742 64fb1a082f58
child 2744 ddfe336de779
prev: retrieve the 'no-topic' result is a clear and reusable option We'll use it more, so let us make it pretty first.
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Fri Jul 14 02:35:12 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Fri Jul 14 02:41:53 2017 +0200
@@ -2062,10 +2062,10 @@
                 raise
 
         displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
+        topic = not opts.get("no_topic", False)
 
         target, bookmark = _findprevtarget(repo, displayer,
-                                           opts.get('move_bookmark'),
-                                           not opts.get("no_topic", False))
+                                           opts.get('move_bookmark'), topic)
         if target is not None:
             _prevupdate(repo, displayer, target, bookmark, dryrunopt)
             return 0