split: basic code cleanup
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 23 Jul 2017 20:25:26 +0200
changeset 2773 9e363e8c1c06
parent 2772 394b836e475b
child 2774 0f167320f90f
split: basic code cleanup We remove a useless extra variable since another one already hold the same value.
hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py	Sun Jul 23 17:28:02 2017 +0200
+++ b/hgext3rd/evolve/cmdrewrite.py	Sun Jul 23 20:25:26 2017 +0200
@@ -783,7 +783,6 @@
         cmdutil.bailifchanged(repo)
         tr = repo.transaction('split')
         ctx = repo[rev]
-        r = ctx.rev()
         disallowunstable = not obsolete.isenabled(repo,
                                                   obsolete.allowunstableopt)
         if disallowunstable:
@@ -833,7 +832,7 @@
             bmupdate(tip.node())
             if bookactive is not None:
                 bookmarksmod.activate(repo, bookactive)
-            obsolete.createmarkers(repo, [(repo[r], newcommits)])
+            obsolete.createmarkers(repo, [(repo[rev], newcommits)])
         tr.close()
     finally:
         lockmod.release(tr, lock, wlock)