Patchwork [7,of,9] strip: remove unncessary "del" and inline variable

login
register
mail settings
Submitter via Mercurial-devel
Date June 19, 2017, 8:47 p.m.
Message ID <8b6444932695a274c93a.1497905279@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/21513/
State Accepted
Headers show

Comments

via Mercurial-devel - June 19, 2017, 8:47 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1497903208 25200
#      Mon Jun 19 13:13:28 2017 -0700
# Node ID 8b6444932695a274c93a06bc3744f99b849d3fab
# Parent  35e3c0300b35a93ce3acfd7234135144ebd2d9f4
strip: remove unncessary "del" and inline variable

Patch

diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -168,9 +168,7 @@ 
 
     mfst = repo.manifestlog._revlog
 
-    curtr = repo.currenttransaction()
-    if curtr is not None:
-        del curtr  # avoid carrying reference to transaction for nothing
+    if repo.currenttransaction() is not None:
         raise error.ProgrammingError('cannot strip from inside a transaction')
 
     try: