prev: rename 'p' to 'target'
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 14 Jul 2017 00:58:14 +0200
changeset 2734 39c3b2b5deb0
parent 2733 adfbb984ebbb
child 2735 28087c173534
prev: rename 'p' to 'target' This makes the code clearer.
hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py	Fri Jul 14 00:54:48 2017 +0530
+++ b/hgext3rd/evolve/__init__.py	Fri Jul 14 00:58:14 2017 +0200
@@ -2017,22 +2017,22 @@
             ui.warn(_('no parent in topic "%s"\n') % topic)
             ui.warn(_('(do you want --no-topic)\n'))
         elif len(parents) == 1:
-            p = parents[0]
+            target = parents[0]
             bm = repo._activebookmark
             shouldmove = opts.get('move_bookmark') and bm is not None
             if dryrunopt:
-                ui.write(('hg update %s;\n' % p.rev()))
+                ui.write(('hg update %s;\n' % target.rev()))
                 if shouldmove:
-                    ui.write(('hg bookmark %s -r %s;\n' % (bm, p.rev())))
+                    ui.write(('hg bookmark %s -r %s;\n' % (bm, target.rev())))
             else:
-                ret = hg.update(repo, p.rev())
+                ret = hg.update(repo, target.rev())
                 if not ret:
                     tr = lock = None
                     try:
                         lock = repo.lock()
                         tr = repo.transaction('previous')
                         if shouldmove:
-                            repo._bookmarks[bm] = p.node()
+                            repo._bookmarks[bm] = target.node()
                             repo._bookmarks.recordchange(tr)
                         else:
                             bookmarksmod.deactivate(repo)
@@ -2040,7 +2040,7 @@
                     finally:
                         lockmod.release(tr, lock)
 
-            displayer.show(p)
+            displayer.show(target)
             return 0
         else:
             for p in parents: