largefiles: wrap "rebase.rebase" for functions using it directly
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 05 Nov 2014 23:24:47 +0900
changeset 23182 9b6c3947b4a7
parent 23181 832b7ef275c8
child 23183 51c9196a6bd0
largefiles: wrap "rebase.rebase" for functions using it directly Before this patch, largefiles extension wraps only "rebase" in the command table by "extensions.wrapcommand". But there are some functions using "rebase.rebase" directly. Without special care for them, largefiles extension can't work correctly with such functions. In addition to it, "special care" often becomes complicated and awkward. For example: - "unshelve" can't get correct result of "rebase.rebase", because of lack of special care - special care for "hg pull --rebase" causes issue3861 This patch wraps "rebase.rebase" for functions using it directly. For simplicity, this patch keeps 'special care for "hg pull --rebase"'. It is removed in the subsequent patch.
hgext/largefiles/uisetup.py
--- a/hgext/largefiles/uisetup.py	Fri Oct 17 14:41:11 2014 +0200
+++ b/hgext/largefiles/uisetup.py	Wed Nov 05 23:24:47 2014 +0900
@@ -169,6 +169,8 @@
         if name == 'rebase':
             extensions.wrapcommand(getattr(module, 'cmdtable'), 'rebase',
                 overrides.overriderebase)
+            extensions.wrapfunction(module, 'rebase',
+                                    overrides.overriderebase)
         if name == 'transplant':
             extensions.wrapcommand(getattr(module, 'cmdtable'), 'transplant',
                 overrides.overridetransplant)