Mercurial > evolve
changeset 2741:51d669b16fa8
prev: explicitly use 'p1' as a variable name
This make the code clearer.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 14 Jul 2017 02:34:42 +0200 |
parents | 51afc979d88d |
children | 64fb1a082f58 |
files | hgext3rd/evolve/__init__.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Fri Jul 14 01:53:56 2017 +0200 +++ b/hgext3rd/evolve/__init__.py Fri Jul 14 02:34:42 2017 +0200 @@ -2006,12 +2006,14 @@ def _findprevtarget(repo, displayer, movebookmark=False, topic=True): target = bookmark = None wkctx = repo[None] - wparents = wkctx.parents() - parents = wparents[0].parents() + p1 = wkctx.parents()[0] + parents = p1.parents() currenttopic = getattr(repo, 'currenttopic', '') if currenttopic and topic: parents = [ctx for ctx in parents if ctx.topic() == currenttopic] - if wparents[0].node() == node.nullid: + + # issue message for the various case + if p1.node() == node.nullid: repo.ui.warn(_('already at repository root\n')) elif not parents and currenttopic: repo.ui.warn(_('no parent in topic "%s"\n') % currenttopic)