Patchwork [1,of,5,V2] histedit: clean up lock imports

mail settings
Submitter Olle Lundberg
Date March 6, 2014, 11:26 a.m.
Message ID <7f824b2d4f11b5668069.1394105174@SE-C02KQ0DADR55>
Download mbox | patch
Permalink /patch/3871/
State Accepted
Commit 70d02abff434a2c3da5fdf0c10fc9d75a76b68ae
Headers show


Olle Lundberg - March 6, 2014, 11:26 a.m.
# HG changeset patch
# User Olle Lundberg <>
# Date 1394053365 -3600
#      Wed Mar 05 22:02:45 2014 +0100
# Node ID 7f824b2d4f11b56680693090804c20fa6b05e790
# Parent  779ceb84f4f782d32dfe47f6684107c08d2f6142
histedit: clean up lock imports

We are alread importing the release function from lock, no need
to actually import the module too.


diff --git a/hgext/ b/hgext/
--- a/hgext/
+++ b/hgext/
@@ -154,11 +154,10 @@ 
 from mercurial import discovery
 from mercurial import error
 from mercurial import copies
 from mercurial import context
 from mercurial import hg
-from mercurial import lock as lockmod
 from mercurial import node
 from mercurial import repair
 from mercurial import scmutil
 from mercurial import util
 from mercurial import obsolete
@@ -899,11 +898,11 @@ 
             # We should process node in reverse order to strip tip most first.
             # but this trigger a bug in changegroup hook.
             # This would reduce bundle overhead
             repair.strip(ui, repo, c)
-        lockmod.release(lock)
+        release(lock)
 def summaryhook(ui, repo):
     if not os.path.exists(repo.join('histedit-state')):
     (parentctxnode, rules, keep, topmost, replacements) = readstate(repo)