Mercurial > hg
comparison hgext/largefiles/uisetup.py @ 21084:70252bdfd39c
largefiles: import whole modules instead of importing parts of them
Be more friendly to demandimport.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 08 Apr 2014 00:48:36 +0200 |
parents | cde32cb5a565 |
children | 23fe278bde43 |
comparison
equal
deleted
inserted
replaced
21083:20b0c49c032c | 21084:70252bdfd39c |
---|---|
7 # GNU General Public License version 2 or any later version. | 7 # GNU General Public License version 2 or any later version. |
8 | 8 |
9 '''setup for largefiles extension: uisetup''' | 9 '''setup for largefiles extension: uisetup''' |
10 | 10 |
11 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \ | 11 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \ |
12 httppeer, merge, scmutil, sshpeer, wireproto, revset | 12 httppeer, merge, scmutil, sshpeer, wireproto, revset, subrepo |
13 from mercurial.i18n import _ | 13 from mercurial.i18n import _ |
14 from mercurial.hgweb import hgweb_mod, webcommands | 14 from mercurial.hgweb import hgweb_mod, webcommands |
15 from mercurial.subrepo import hgsubrepo | |
16 | 15 |
17 import overrides | 16 import overrides |
18 import proto | 17 import proto |
19 | 18 |
20 def uisetup(ui): | 19 def uisetup(ui): |
40 overrides.overrideforget) | 39 overrides.overrideforget) |
41 | 40 |
42 # Subrepos call status function | 41 # Subrepos call status function |
43 entry = extensions.wrapcommand(commands.table, 'status', | 42 entry = extensions.wrapcommand(commands.table, 'status', |
44 overrides.overridestatus) | 43 overrides.overridestatus) |
45 entry = extensions.wrapfunction(hgsubrepo, 'status', | 44 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'status', |
46 overrides.overridestatusfn) | 45 overrides.overridestatusfn) |
47 | 46 |
48 entry = extensions.wrapcommand(commands.table, 'log', | 47 entry = extensions.wrapcommand(commands.table, 'log', |
49 overrides.overridelog) | 48 overrides.overridelog) |
50 entry = extensions.wrapcommand(commands.table, 'rollback', | 49 entry = extensions.wrapcommand(commands.table, 'rollback', |
104 overrides.overridefilemerge) | 103 overrides.overridefilemerge) |
105 entry = extensions.wrapfunction(cmdutil, 'copy', | 104 entry = extensions.wrapfunction(cmdutil, 'copy', |
106 overrides.overridecopy) | 105 overrides.overridecopy) |
107 | 106 |
108 # Summary calls dirty on the subrepos | 107 # Summary calls dirty on the subrepos |
109 entry = extensions.wrapfunction(hgsubrepo, 'dirty', | 108 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'dirty', |
110 overrides.overridedirty) | 109 overrides.overridedirty) |
111 | 110 |
112 # Backout calls revert so we need to override both the command and the | 111 # Backout calls revert so we need to override both the command and the |
113 # function | 112 # function |
114 entry = extensions.wrapcommand(commands.table, 'revert', | 113 entry = extensions.wrapcommand(commands.table, 'revert', |
118 | 117 |
119 extensions.wrapfunction(hg, 'updaterepo', overrides.hgupdaterepo) | 118 extensions.wrapfunction(hg, 'updaterepo', overrides.hgupdaterepo) |
120 extensions.wrapfunction(hg, 'merge', overrides.hgmerge) | 119 extensions.wrapfunction(hg, 'merge', overrides.hgmerge) |
121 | 120 |
122 extensions.wrapfunction(archival, 'archive', overrides.overridearchive) | 121 extensions.wrapfunction(archival, 'archive', overrides.overridearchive) |
123 extensions.wrapfunction(hgsubrepo, 'archive', overrides.hgsubrepoarchive) | 122 extensions.wrapfunction(subrepo.hgsubrepo, 'archive', |
123 overrides.hgsubrepoarchive) | |
124 extensions.wrapfunction(cmdutil, 'bailifchanged', | 124 extensions.wrapfunction(cmdutil, 'bailifchanged', |
125 overrides.overridebailifchanged) | 125 overrides.overridebailifchanged) |
126 | 126 |
127 # create the new wireproto commands ... | 127 # create the new wireproto commands ... |
128 wireproto.commands['putlfile'] = (proto.putlfile, 'sha') | 128 wireproto.commands['putlfile'] = (proto.putlfile, 'sha') |