prev: explicitly use 'p1' as a variable name
This make the code clearer.
--- 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)