author | Gregory Szorc <gregory.szorc@gmail.com> |
Wed, 07 Mar 2018 16:18:52 -0800 | |
changeset 36801 | 66de4555cefd |
parent 36800 | 0b18604db95e |
child 37295 | 45b39c69fae0 |
permissions | -rw-r--r-- |
15168 | 1 |
# Copyright 2009-2010 Gregory P. Ward |
2 |
# Copyright 2009-2010 Intelerad Medical Systems Incorporated |
|
3 |
# Copyright 2010-2011 Fog Creek Software |
|
4 |
# Copyright 2010-2011 Unity Technologies |
|
5 |
# |
|
6 |
# This software may be used and distributed according to the terms of the |
|
7 |
# GNU General Public License version 2 or any later version. |
|
8 |
||
9 |
'''setup for largefiles extension: uisetup''' |
|
29315
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
10 |
from __future__ import absolute_import |
15168 | 11 |
|
12 |
from mercurial.i18n import _ |
|
29315
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
13 |
|
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
14 |
from mercurial.hgweb import ( |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
15 |
webcommands, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
16 |
) |
15168 | 17 |
|
29315
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
18 |
from mercurial import ( |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
19 |
archival, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
20 |
cmdutil, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
21 |
commands, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
22 |
copies, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
23 |
exchange, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
24 |
extensions, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
25 |
filemerge, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
26 |
hg, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
27 |
httppeer, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
28 |
merge, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
29 |
scmutil, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
30 |
sshpeer, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
31 |
subrepo, |
35303
67b7e39b441b
largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents:
34075
diff
changeset
|
32 |
upgrade, |
35564
cf841f2b5a72
largefiles: add support for 'largefiles://' url scheme
Boris Feld <boris.feld@octobus.net>
parents:
35507
diff
changeset
|
33 |
url, |
29315
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
34 |
wireproto, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
35 |
) |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
36 |
|
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
37 |
from . import ( |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
38 |
overrides, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
39 |
proto, |
2143266ecb65
py3: make largefiles/uisetup.py use absolute_import
liscju <piotr.listkiewicz@gmail.com>
parents:
28878
diff
changeset
|
40 |
) |
15168 | 41 |
|
42 |
def uisetup(ui): |
|
43 |
# Disable auto-status for some commands which assume that all |
|
44 |
# files in the result are under Mercurial's control |
|
45 |
||
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
46 |
entry = extensions.wrapcommand(commands.table, 'add', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
47 |
overrides.overrideadd) |
15168 | 48 |
addopt = [('', 'large', None, _('add as largefile')), |
15944
f19d5c852f9b
largefiles: add --normal option to hg add (issue3061)
Na'Tosha Bard <natosha@unity3d.com>
parents:
15674
diff
changeset
|
49 |
('', 'normal', None, _('add as normal file')), |
15627
9d7a83a42f8c
largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents:
15383
diff
changeset
|
50 |
('', 'lfsize', '', _('add all files above this size ' |
9d7a83a42f8c
largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents:
15383
diff
changeset
|
51 |
'(in megabytes) as largefiles ' |
9d7a83a42f8c
largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents:
15383
diff
changeset
|
52 |
'(default: 10)'))] |
15168 | 53 |
entry[1].extend(addopt) |
54 |
||
17658
a02c1ffddae9
largefiles: handle commit -A properly, after a --large commit (issue3542)
Matt Harbison <matt_harbison@yahoo.com>
parents:
17601
diff
changeset
|
55 |
# The scmutil function is called both by the (trivial) addremove command, |
a02c1ffddae9
largefiles: handle commit -A properly, after a --large commit (issue3542)
Matt Harbison <matt_harbison@yahoo.com>
parents:
17601
diff
changeset
|
56 |
# and in the process of handling commit -A (issue3542) |
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
57 |
extensions.wrapfunction(scmutil, 'addremove', overrides.scmutiladdremove) |
23886
5ce8dcd05dc4
largefiles: enable subrepo support for add
Matt Harbison <matt_harbison@yahoo.com>
parents:
23837
diff
changeset
|
58 |
extensions.wrapfunction(cmdutil, 'add', overrides.cmdutiladd) |
23782
304e69cb1ee9
largefiles: enable subrepo support for remove
Matt Harbison <matt_harbison@yahoo.com>
parents:
23441
diff
changeset
|
59 |
extensions.wrapfunction(cmdutil, 'remove', overrides.cmdutilremove) |
23837
2b79d124a12f
largefiles: enable subrepo support for forget
Matt Harbison <matt_harbison@yahoo.com>
parents:
23782
diff
changeset
|
60 |
extensions.wrapfunction(cmdutil, 'forget', overrides.cmdutilforget) |
16515
12dabc22de77
largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents:
16449
diff
changeset
|
61 |
|
24230
23438bceba04
largefiles: report the source of copied/moved largefiles in status -C
Matt Harbison <matt_harbison@yahoo.com>
parents:
23886
diff
changeset
|
62 |
extensions.wrapfunction(copies, 'pathcopies', overrides.copiespathcopies) |
23438bceba04
largefiles: report the source of copied/moved largefiles in status -C
Matt Harbison <matt_harbison@yahoo.com>
parents:
23886
diff
changeset
|
63 |
|
35303
67b7e39b441b
largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents:
34075
diff
changeset
|
64 |
extensions.wrapfunction(upgrade, 'preservedrequirements', |
67b7e39b441b
largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents:
34075
diff
changeset
|
65 |
overrides.upgraderequirements) |
67b7e39b441b
largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents:
34075
diff
changeset
|
66 |
|
67b7e39b441b
largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents:
34075
diff
changeset
|
67 |
extensions.wrapfunction(upgrade, 'supporteddestrequirements', |
67b7e39b441b
largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents:
34075
diff
changeset
|
68 |
overrides.upgraderequirements) |
67b7e39b441b
largefiles: allow to run 'debugupgraderepo' on repo with largefiles
Boris Feld <boris.feld@octobus.net>
parents:
34075
diff
changeset
|
69 |
|
16515
12dabc22de77
largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents:
16449
diff
changeset
|
70 |
# Subrepos call status function |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
71 |
entry = extensions.wrapcommand(commands.table, 'status', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
72 |
overrides.overridestatus) |
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
73 |
extensions.wrapfunction(subrepo.hgsubrepo, 'status', |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
74 |
overrides.overridestatusfn) |
16515
12dabc22de77
largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents:
16449
diff
changeset
|
75 |
|
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
76 |
entry = extensions.wrapcommand(commands.table, 'log', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
77 |
overrides.overridelog) |
15168 | 78 |
entry = extensions.wrapcommand(commands.table, 'rollback', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
79 |
overrides.overriderollback) |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
80 |
entry = extensions.wrapcommand(commands.table, 'verify', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
81 |
overrides.overrideverify) |
15168 | 82 |
|
18547
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
83 |
verifyopt = [('', 'large', None, |
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
84 |
_('verify that all largefiles in current revision exists')), |
15168 | 85 |
('', 'lfa', None, |
18547
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
86 |
_('verify largefiles in all revisions, not just current')), |
15168 | 87 |
('', 'lfc', None, |
18547
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
88 |
_('verify local largefile contents, not just existence'))] |
15168 | 89 |
entry[1].extend(verifyopt) |
90 |
||
18144
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
91 |
entry = extensions.wrapcommand(commands.table, 'debugstate', |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
92 |
overrides.overridedebugstate) |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
93 |
debugstateopt = [('', 'large', None, _('display largefiles dirstate'))] |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
94 |
entry[1].extend(debugstateopt) |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
95 |
|
21052
cde32cb5a565
largefiles: use "outgoinghooks" to avoid redundant outgoing check
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21048
diff
changeset
|
96 |
outgoing = lambda orgfunc, *arg, **kwargs: orgfunc(*arg, **kwargs) |
cde32cb5a565
largefiles: use "outgoinghooks" to avoid redundant outgoing check
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21048
diff
changeset
|
97 |
entry = extensions.wrapcommand(commands.table, 'outgoing', outgoing) |
15168 | 98 |
outgoingopt = [('', 'large', None, _('display outgoing largefiles'))] |
99 |
entry[1].extend(outgoingopt) |
|
21052
cde32cb5a565
largefiles: use "outgoinghooks" to avoid redundant outgoing check
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21048
diff
changeset
|
100 |
cmdutil.outgoinghooks.add('largefiles', overrides.outgoinghook) |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
101 |
entry = extensions.wrapcommand(commands.table, 'summary', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
102 |
overrides.overridesummary) |
15168 | 103 |
summaryopt = [('', 'large', None, _('display outgoing largefiles'))] |
104 |
entry[1].extend(summaryopt) |
|
21048
ca7a57464fb3
largefiles: use "summaryremotehooks" to avoid redundant outgoing check
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20638
diff
changeset
|
105 |
cmdutil.summaryremotehooks.add('largefiles', overrides.summaryremotehook) |
15168 | 106 |
|
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
107 |
entry = extensions.wrapcommand(commands.table, 'pull', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
108 |
overrides.overridepull) |
16692
b9969574540a
largefiles: add --all-largefiles flag to pull
Na'Tosha Bard <natosha@unity3d.com>
parents:
16644
diff
changeset
|
109 |
pullopt = [('', 'all-largefiles', None, |
18982
43cb150e74f9
largefiles: deprecate --all-largefiles for pull
Mads Kiilerich <madski@unity3d.com>
parents:
18980
diff
changeset
|
110 |
_('download all pulled versions of largefiles (DEPRECATED)')), |
18978
8abaadab9abb
largefiles: introduce pull --lfrev option
Mads Kiilerich <madski@unity3d.com>
parents:
18704
diff
changeset
|
111 |
('', 'lfrev', [], |
8abaadab9abb
largefiles: introduce pull --lfrev option
Mads Kiilerich <madski@unity3d.com>
parents:
18704
diff
changeset
|
112 |
_('download largefiles for these revisions'), _('REV'))] |
16692
b9969574540a
largefiles: add --all-largefiles flag to pull
Na'Tosha Bard <natosha@unity3d.com>
parents:
16644
diff
changeset
|
113 |
entry[1].extend(pullopt) |
18979
1176832fc757
largefiles: introduce pulled() revset expression for use in --lfrev
Mads Kiilerich <madski@unity3d.com>
parents:
18978
diff
changeset
|
114 |
|
28878
a75c9665ef06
largefiles: introduce push --lfrev to control which revisions are pushed
Mads Kiilerich <madski@unity3d.com>
parents:
28394
diff
changeset
|
115 |
entry = extensions.wrapcommand(commands.table, 'push', |
a75c9665ef06
largefiles: introduce push --lfrev to control which revisions are pushed
Mads Kiilerich <madski@unity3d.com>
parents:
28394
diff
changeset
|
116 |
overrides.overridepush) |
a75c9665ef06
largefiles: introduce push --lfrev to control which revisions are pushed
Mads Kiilerich <madski@unity3d.com>
parents:
28394
diff
changeset
|
117 |
pushopt = [('', 'lfrev', [], |
a75c9665ef06
largefiles: introduce push --lfrev to control which revisions are pushed
Mads Kiilerich <madski@unity3d.com>
parents:
28394
diff
changeset
|
118 |
_('upload largefiles for these revisions'), _('REV'))] |
a75c9665ef06
largefiles: introduce push --lfrev to control which revisions are pushed
Mads Kiilerich <madski@unity3d.com>
parents:
28394
diff
changeset
|
119 |
entry[1].extend(pushopt) |
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
120 |
extensions.wrapfunction(exchange, 'pushoperation', |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
121 |
overrides.exchangepushoperation) |
28878
a75c9665ef06
largefiles: introduce push --lfrev to control which revisions are pushed
Mads Kiilerich <madski@unity3d.com>
parents:
28394
diff
changeset
|
122 |
|
16644
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
123 |
entry = extensions.wrapcommand(commands.table, 'clone', |
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
124 |
overrides.overrideclone) |
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
125 |
cloneopt = [('', 'all-largefiles', None, |
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
126 |
_('download all versions of all largefiles'))] |
17601
6e2ab601be3f
largefiles: delegate to the wrapped clone command
Matt Harbison <matt_harbison@yahoo.com>
parents:
17192
diff
changeset
|
127 |
entry[1].extend(cloneopt) |
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
128 |
extensions.wrapfunction(hg, 'clone', overrides.hgclone) |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
129 |
extensions.wrapfunction(hg, 'postshare', overrides.hgpostshare) |
16644
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
130 |
|
16439
290850e7aa43
largefiles: fix cat for largefiles (issue3352)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16247
diff
changeset
|
131 |
entry = extensions.wrapcommand(commands.table, 'cat', |
290850e7aa43
largefiles: fix cat for largefiles (issue3352)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16247
diff
changeset
|
132 |
overrides.overridecat) |
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
133 |
extensions.wrapfunction(merge, '_checkunknownfile', |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
134 |
overrides.overridecheckunknownfile) |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
135 |
extensions.wrapfunction(merge, 'calculateupdates', |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
136 |
overrides.overridecalculateupdates) |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
137 |
extensions.wrapfunction(merge, 'recordupdates', |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
138 |
overrides.mergerecordupdates) |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
139 |
extensions.wrapfunction(merge, 'update', overrides.mergeupdate) |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
140 |
extensions.wrapfunction(filemerge, '_filemerge', |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
141 |
overrides.overridefilemerge) |
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
142 |
extensions.wrapfunction(cmdutil, 'copy', overrides.overridecopy) |
15168 | 143 |
|
16516
597ddcb41b32
largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents:
16515
diff
changeset
|
144 |
# Summary calls dirty on the subrepos |
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
145 |
extensions.wrapfunction(subrepo.hgsubrepo, 'dirty', overrides.overridedirty) |
16516
597ddcb41b32
largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents:
16515
diff
changeset
|
146 |
|
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
147 |
extensions.wrapfunction(cmdutil, 'revert', overrides.overriderevert) |
15168 | 148 |
|
25811
7699d3212994
largefiles: allow the archiving of largefiles to be disabled
Matt Harbison <matt_harbison@yahoo.com>
parents:
24474
diff
changeset
|
149 |
extensions.wrapcommand(commands.table, 'archive', |
7699d3212994
largefiles: allow the archiving of largefiles to be disabled
Matt Harbison <matt_harbison@yahoo.com>
parents:
24474
diff
changeset
|
150 |
overrides.overridearchivecmd) |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
151 |
extensions.wrapfunction(archival, 'archive', overrides.overridearchive) |
21084
70252bdfd39c
largefiles: import whole modules instead of importing parts of them
Mads Kiilerich <madski@unity3d.com>
parents:
21052
diff
changeset
|
152 |
extensions.wrapfunction(subrepo.hgsubrepo, 'archive', |
70252bdfd39c
largefiles: import whole modules instead of importing parts of them
Mads Kiilerich <madski@unity3d.com>
parents:
21052
diff
changeset
|
153 |
overrides.hgsubrepoarchive) |
34075
a9d8caf95941
largefiles: remove unused assignments from wrapfunction()
Martin von Zweigbergk <martinvonz@google.com>
parents:
32377
diff
changeset
|
154 |
extensions.wrapfunction(webcommands, 'archive', overrides.hgwebarchive) |
15349
63455eb771af
largefiles: drop more unnecessary compatibility checks
Greg Ward <greg@gerg.ca>
parents:
15295
diff
changeset
|
155 |
extensions.wrapfunction(cmdutil, 'bailifchanged', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
156 |
overrides.overridebailifchanged) |
15168 | 157 |
|
27944
4511e8dac4c7
largefiles: report the missing file count after a commit that does nothing
Matt Harbison <matt_harbison@yahoo.com>
parents:
27586
diff
changeset
|
158 |
extensions.wrapfunction(cmdutil, 'postcommitstatus', |
4511e8dac4c7
largefiles: report the missing file count after a commit that does nothing
Matt Harbison <matt_harbison@yahoo.com>
parents:
27586
diff
changeset
|
159 |
overrides.postcommitstatus) |
22289
e26df4e774f6
largefiles: update largefiles even if transplant is aborted by conflict
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22288
diff
changeset
|
160 |
extensions.wrapfunction(scmutil, 'marktouched', |
e26df4e774f6
largefiles: update largefiles even if transplant is aborted by conflict
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22288
diff
changeset
|
161 |
overrides.scmutilmarktouched) |
e26df4e774f6
largefiles: update largefiles even if transplant is aborted by conflict
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22288
diff
changeset
|
162 |
|
35564
cf841f2b5a72
largefiles: add support for 'largefiles://' url scheme
Boris Feld <boris.feld@octobus.net>
parents:
35507
diff
changeset
|
163 |
extensions.wrapfunction(url, 'open', |
cf841f2b5a72
largefiles: add support for 'largefiles://' url scheme
Boris Feld <boris.feld@octobus.net>
parents:
35507
diff
changeset
|
164 |
overrides.openlargefile) |
cf841f2b5a72
largefiles: add support for 'largefiles://' url scheme
Boris Feld <boris.feld@octobus.net>
parents:
35507
diff
changeset
|
165 |
|
15168 | 166 |
# create the new wireproto commands ... |
36800
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
167 |
wireproto.wireprotocommand('putlfile', 'sha', permission='push')( |
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
168 |
proto.putlfile) |
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
169 |
wireproto.wireprotocommand('getlfile', 'sha', permission='pull')( |
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
170 |
proto.getlfile) |
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
171 |
wireproto.wireprotocommand('statlfile', 'sha', permission='pull')( |
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
172 |
proto.statlfile) |
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
173 |
wireproto.wireprotocommand('lheads', '', permission='pull')( |
0b18604db95e
wireproto: declare permissions requirements in @wireprotocommand (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36760
diff
changeset
|
174 |
wireproto.heads) |
15168 | 175 |
|
176 |
# ... and wrap some existing ones |
|
35983
f540b6448738
largefiles: register wire protocol commands with modern APIs
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35977
diff
changeset
|
177 |
wireproto.commands['heads'].func = proto.heads |
15168 | 178 |
|
16449
874a680a3e23
largefiles: hide .hglf/ prefix for largefiles in hgweb
Martin Geisler <mg@lazybytes.net>
parents:
16439
diff
changeset
|
179 |
extensions.wrapfunction(webcommands, 'decodepath', overrides.decodepath) |
874a680a3e23
largefiles: hide .hglf/ prefix for largefiles in hgweb
Martin Geisler <mg@lazybytes.net>
parents:
16439
diff
changeset
|
180 |
|
35507
95a9be56c3bb
largefiles: modernize how capabilities are added to the wire protocol
Matt Harbison <matt_harbison@yahoo.com>
parents:
35303
diff
changeset
|
181 |
extensions.wrapfunction(wireproto, '_capabilities', proto._capabilities) |
15168 | 182 |
|
183 |
# can't do this in reposetup because it needs to have happened before |
|
184 |
# wirerepo.__init__ is called |
|
35977
625038cb4b1d
sshpeer: rename sshpeer class to sshv1peer (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35564
diff
changeset
|
185 |
proto.ssholdcallstream = sshpeer.sshv1peer._callstream |
17192
1ac628cd7113
peer: introduce real peer classes
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
16692
diff
changeset
|
186 |
proto.httpoldcallstream = httppeer.httppeer._callstream |
35977
625038cb4b1d
sshpeer: rename sshpeer class to sshv1peer (API)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
35564
diff
changeset
|
187 |
sshpeer.sshv1peer._callstream = proto.sshrepocallstream |
17192
1ac628cd7113
peer: introduce real peer classes
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
16692
diff
changeset
|
188 |
httppeer.httppeer._callstream = proto.httprepocallstream |
15168 | 189 |
|
190 |
# override some extensions' stuff as well |
|
191 |
for name, module in extensions.extensions(): |
|
192 |
if name == 'purge': |
|
193 |
extensions.wrapcommand(getattr(module, 'cmdtable'), 'purge', |
|
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
194 |
overrides.overridepurge) |
15168 | 195 |
if name == 'rebase': |
196 |
extensions.wrapcommand(getattr(module, 'cmdtable'), 'rebase', |
|
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
197 |
overrides.overriderebase) |
23182
9b6c3947b4a7
largefiles: wrap "rebase.rebase" for functions using it directly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22289
diff
changeset
|
198 |
extensions.wrapfunction(module, 'rebase', |
9b6c3947b4a7
largefiles: wrap "rebase.rebase" for functions using it directly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22289
diff
changeset
|
199 |
overrides.overriderebase) |
15383
155d0f8fb7e5
largefiles: fix bad bug where transplanting a changeset with a largefile will result in an old largefile being comitted later on
Na'Tosha Bard <natosha@unity3d.com>
parents:
15356
diff
changeset
|
200 |
if name == 'transplant': |
155d0f8fb7e5
largefiles: fix bad bug where transplanting a changeset with a largefile will result in an old largefile being comitted later on
Na'Tosha Bard <natosha@unity3d.com>
parents:
15356
diff
changeset
|
201 |
extensions.wrapcommand(getattr(module, 'cmdtable'), 'transplant', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
202 |
overrides.overridetransplant) |