[PATCH 2 of 2 RESEND] keyword: move repo.__class__ assignment out of monkeypatch context

Christian Ebert blacktrash at gmx.net
Tue Jan 25 12:22:19 CST 2011


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1295918391 -3600
# Node ID 595576346c31bb4a168520cfa33a614c7dbcec12
# Parent  a61e5b17f89089db9f51779c77592818f23443d4
keyword: move repo.__class__ assignment out of monkeypatch context

A cosmetic change to improve readability.

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -636,8 +636,6 @@
         finally:
             wlock.release()
 
-    repo.__class__ = kwrepo
-
     def kwfilectx_cmp(orig, self, fctx):
         # keyword affects data size, comparing wdir and filelog size does
         # not make sense
@@ -661,6 +659,8 @@
         except KeyError:
             pass
 
+    repo.__class__ = kwrepo
+
 cmdtable = {
     'kwdemo':
         (demo,


More information about the Mercurial-devel mailing list