Patchwork [1,of,3] localrepo: remove dead initialization of 'lock'

login
register
mail settings
Submitter Martin von Zweigbergk
Date Oct. 13, 2014, 9:42 p.m.
Message ID <d15cebdd63433e29201c.1413236528@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6238/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Oct. 13, 2014, 9:42 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1413236093 25200
#      Mon Oct 13 14:34:53 2014 -0700
# Node ID d15cebdd63433e29201c8f66f2aeb4e456bc6810
# Parent  1533e642262de32c5a2445789710f49237019fd6
localrepo: remove dead initialization of 'lock'

The 'lock' variable is initialized to None, but before it's ever read,
it's assigned again.

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1371,7 +1371,7 @@ 
         Revision information is passed via the context argument.
         """
 
-        tr = lock = None
+        tr = None
         removed = list(ctx.removed())
         p1, p2 = ctx.p1(), ctx.p2()
         user = ctx.user()