changeset 24270:c256ae48fd26

record: remove dependency on extensions module in dorecord Part of a series of patches to move record from hgext to core
author Laurent Charignon <lcharignon@fb.com>
date Tue, 10 Mar 2015 17:03:40 -0700
parents 9a745ced79a9
children 18792f2e38bb
files hgext/record.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/record.py	Tue Mar 10 14:42:07 2015 -0700
+++ b/hgext/record.py	Tue Mar 10 17:03:40 2015 -0700
@@ -253,7 +253,11 @@
         for chunk, l in patch.difflabel(lambda: args):
             orig(chunk, label=label + l)
     oldwrite = ui.write
-    extensions.wrapfunction(ui, 'write', wrapwrite)
+
+    def wrap(*args, **kwargs):
+        return wrapwrite(oldwrite, *args, **kwargs)
+    setattr(ui, 'write', wrap)
+
     try:
         return cmdutil.commit(ui, repo, recordfunc, pats, opts)
     finally: