Mercurial > hg
comparison hgext/largefiles/uisetup.py @ 34075:a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
The return values from wrapfunction() were never used here. Using the
value is also a little tricky and wrappedfunction() should be
preferred, so let's just delete the assignments.
There's also a bunch of return values from wrapcommand() being
assigned to a variable here, but at least that value can be (and is
used after some of the assignments).
Differential Revision: https://phab.mercurial-scm.org/D618
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 31 Aug 2017 22:39:10 -0700 |
parents | c942c83ac2ec |
children | 67b7e39b441b |
comparison
equal
deleted
inserted
replaced
34074:abf91c4f9608 | 34075:a9d8caf95941 |
---|---|
51 '(default: 10)'))] | 51 '(default: 10)'))] |
52 entry[1].extend(addopt) | 52 entry[1].extend(addopt) |
53 | 53 |
54 # The scmutil function is called both by the (trivial) addremove command, | 54 # The scmutil function is called both by the (trivial) addremove command, |
55 # and in the process of handling commit -A (issue3542) | 55 # and in the process of handling commit -A (issue3542) |
56 entry = extensions.wrapfunction(scmutil, 'addremove', | 56 extensions.wrapfunction(scmutil, 'addremove', overrides.scmutiladdremove) |
57 overrides.scmutiladdremove) | |
58 extensions.wrapfunction(cmdutil, 'add', overrides.cmdutiladd) | 57 extensions.wrapfunction(cmdutil, 'add', overrides.cmdutiladd) |
59 extensions.wrapfunction(cmdutil, 'remove', overrides.cmdutilremove) | 58 extensions.wrapfunction(cmdutil, 'remove', overrides.cmdutilremove) |
60 extensions.wrapfunction(cmdutil, 'forget', overrides.cmdutilforget) | 59 extensions.wrapfunction(cmdutil, 'forget', overrides.cmdutilforget) |
61 | 60 |
62 extensions.wrapfunction(copies, 'pathcopies', overrides.copiespathcopies) | 61 extensions.wrapfunction(copies, 'pathcopies', overrides.copiespathcopies) |
63 | 62 |
64 # Subrepos call status function | 63 # Subrepos call status function |
65 entry = extensions.wrapcommand(commands.table, 'status', | 64 entry = extensions.wrapcommand(commands.table, 'status', |
66 overrides.overridestatus) | 65 overrides.overridestatus) |
67 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'status', | 66 extensions.wrapfunction(subrepo.hgsubrepo, 'status', |
68 overrides.overridestatusfn) | 67 overrides.overridestatusfn) |
69 | 68 |
70 entry = extensions.wrapcommand(commands.table, 'log', | 69 entry = extensions.wrapcommand(commands.table, 'log', |
71 overrides.overridelog) | 70 overrides.overridelog) |
72 entry = extensions.wrapcommand(commands.table, 'rollback', | 71 entry = extensions.wrapcommand(commands.table, 'rollback', |
73 overrides.overriderollback) | 72 overrides.overriderollback) |
109 entry = extensions.wrapcommand(commands.table, 'push', | 108 entry = extensions.wrapcommand(commands.table, 'push', |
110 overrides.overridepush) | 109 overrides.overridepush) |
111 pushopt = [('', 'lfrev', [], | 110 pushopt = [('', 'lfrev', [], |
112 _('upload largefiles for these revisions'), _('REV'))] | 111 _('upload largefiles for these revisions'), _('REV'))] |
113 entry[1].extend(pushopt) | 112 entry[1].extend(pushopt) |
114 entry = extensions.wrapfunction(exchange, 'pushoperation', | 113 extensions.wrapfunction(exchange, 'pushoperation', |
115 overrides.exchangepushoperation) | 114 overrides.exchangepushoperation) |
116 | 115 |
117 entry = extensions.wrapcommand(commands.table, 'clone', | 116 entry = extensions.wrapcommand(commands.table, 'clone', |
118 overrides.overrideclone) | 117 overrides.overrideclone) |
119 cloneopt = [('', 'all-largefiles', None, | 118 cloneopt = [('', 'all-largefiles', None, |
120 _('download all versions of all largefiles'))] | 119 _('download all versions of all largefiles'))] |
121 entry[1].extend(cloneopt) | 120 entry[1].extend(cloneopt) |
122 entry = extensions.wrapfunction(hg, 'clone', overrides.hgclone) | 121 extensions.wrapfunction(hg, 'clone', overrides.hgclone) |
123 entry = extensions.wrapfunction(hg, 'postshare', overrides.hgpostshare) | 122 extensions.wrapfunction(hg, 'postshare', overrides.hgpostshare) |
124 | 123 |
125 entry = extensions.wrapcommand(commands.table, 'cat', | 124 entry = extensions.wrapcommand(commands.table, 'cat', |
126 overrides.overridecat) | 125 overrides.overridecat) |
127 entry = extensions.wrapfunction(merge, '_checkunknownfile', | 126 extensions.wrapfunction(merge, '_checkunknownfile', |
128 overrides.overridecheckunknownfile) | 127 overrides.overridecheckunknownfile) |
129 entry = extensions.wrapfunction(merge, 'calculateupdates', | 128 extensions.wrapfunction(merge, 'calculateupdates', |
130 overrides.overridecalculateupdates) | 129 overrides.overridecalculateupdates) |
131 entry = extensions.wrapfunction(merge, 'recordupdates', | 130 extensions.wrapfunction(merge, 'recordupdates', |
132 overrides.mergerecordupdates) | 131 overrides.mergerecordupdates) |
133 entry = extensions.wrapfunction(merge, 'update', | 132 extensions.wrapfunction(merge, 'update', overrides.mergeupdate) |
134 overrides.mergeupdate) | 133 extensions.wrapfunction(filemerge, '_filemerge', |
135 entry = extensions.wrapfunction(filemerge, '_filemerge', | 134 overrides.overridefilemerge) |
136 overrides.overridefilemerge) | 135 extensions.wrapfunction(cmdutil, 'copy', overrides.overridecopy) |
137 entry = extensions.wrapfunction(cmdutil, 'copy', | |
138 overrides.overridecopy) | |
139 | 136 |
140 # Summary calls dirty on the subrepos | 137 # Summary calls dirty on the subrepos |
141 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'dirty', | 138 extensions.wrapfunction(subrepo.hgsubrepo, 'dirty', overrides.overridedirty) |
142 overrides.overridedirty) | |
143 | 139 |
144 entry = extensions.wrapfunction(cmdutil, 'revert', | 140 extensions.wrapfunction(cmdutil, 'revert', overrides.overriderevert) |
145 overrides.overriderevert) | |
146 | 141 |
147 extensions.wrapcommand(commands.table, 'archive', | 142 extensions.wrapcommand(commands.table, 'archive', |
148 overrides.overridearchivecmd) | 143 overrides.overridearchivecmd) |
149 extensions.wrapfunction(archival, 'archive', overrides.overridearchive) | 144 extensions.wrapfunction(archival, 'archive', overrides.overridearchive) |
150 extensions.wrapfunction(subrepo.hgsubrepo, 'archive', | 145 extensions.wrapfunction(subrepo.hgsubrepo, 'archive', |
151 overrides.hgsubrepoarchive) | 146 overrides.hgsubrepoarchive) |
152 extensions.wrapfunction(webcommands, 'archive', | 147 extensions.wrapfunction(webcommands, 'archive', overrides.hgwebarchive) |
153 overrides.hgwebarchive) | |
154 extensions.wrapfunction(cmdutil, 'bailifchanged', | 148 extensions.wrapfunction(cmdutil, 'bailifchanged', |
155 overrides.overridebailifchanged) | 149 overrides.overridebailifchanged) |
156 | 150 |
157 extensions.wrapfunction(cmdutil, 'postcommitstatus', | 151 extensions.wrapfunction(cmdutil, 'postcommitstatus', |
158 overrides.postcommitstatus) | 152 overrides.postcommitstatus) |