Mercurial > hg
annotate hgext/largefiles/uisetup.py @ 25382:6084926366b9
summary: move the parents phase marker to commit line (issue4688)
The phase of the pending commit depends on the parent of the working directory
and on the phases.newcommit configuration.
First, this information rather depend on the commit line which describe the
pending commit.
Then, we only want to be advertised when the pending phase is going to be higher
than the default new commit phase.
So the format will change from
$ hg summary
parent: 2:ab91dfabc5ad
foo
parent: 3:24f1031ad244 tip
bar
branch: default
commit: 1 modified, 1 unknown, 1 unresolved (merge)
update: (current)
phases: 1 secret (secret)
to
parent: 2:ab91dfabc5ad
foo
parent: 3:24f1031ad244 tip
bar
branch: default
commit: 1 modified, 1 unknown, 1 unresolved (merge) (secret)
update: (current)
phases: 1 secret
author | Gilles Moris <gilles.moris@free.fr> |
---|---|
date | Fri, 29 May 2015 22:23:58 +0200 |
parents | 61a99993f8a7 |
children | 7699d3212994 |
rev | line source |
---|---|
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''' | |
10 | |
11 from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \ | |
24230
23438bceba04
largefiles: report the source of copied/moved largefiles in status -C
Matt Harbison <matt_harbison@yahoo.com>
parents:
23886
diff
changeset
|
12 httppeer, merge, scmutil, sshpeer, wireproto, revset, subrepo, copies |
15168 | 13 from mercurial.i18n import _ |
18298
3598c585e464
largefiles: remove unused proto.refuseclient code
Mads Kiilerich <madski@unity3d.com>
parents:
18144
diff
changeset
|
14 from mercurial.hgweb import hgweb_mod, webcommands |
15168 | 15 |
16 import overrides | |
17 import proto | |
18 | |
19 def uisetup(ui): | |
20 # Disable auto-status for some commands which assume that all | |
21 # files in the result are under Mercurial's control | |
22 | |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
23 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
|
24 overrides.overrideadd) |
15168 | 25 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
|
26 ('', 'normal', None, _('add as normal file')), |
15627
9d7a83a42f8c
largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents:
15383
diff
changeset
|
27 ('', 'lfsize', '', _('add all files above this size ' |
9d7a83a42f8c
largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents:
15383
diff
changeset
|
28 '(in megabytes) as largefiles ' |
9d7a83a42f8c
largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents:
15383
diff
changeset
|
29 '(default: 10)'))] |
15168 | 30 entry[1].extend(addopt) |
31 | |
17658
a02c1ffddae9
largefiles: handle commit -A properly, after a --large commit (issue3542)
Matt Harbison <matt_harbison@yahoo.com>
parents:
17601
diff
changeset
|
32 # 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
|
33 # and in the process of handling commit -A (issue3542) |
a02c1ffddae9
largefiles: handle commit -A properly, after a --large commit (issue3542)
Matt Harbison <matt_harbison@yahoo.com>
parents:
17601
diff
changeset
|
34 entry = extensions.wrapfunction(scmutil, 'addremove', |
a02c1ffddae9
largefiles: handle commit -A properly, after a --large commit (issue3542)
Matt Harbison <matt_harbison@yahoo.com>
parents:
17601
diff
changeset
|
35 overrides.scmutiladdremove) |
23886
5ce8dcd05dc4
largefiles: enable subrepo support for add
Matt Harbison <matt_harbison@yahoo.com>
parents:
23837
diff
changeset
|
36 extensions.wrapfunction(cmdutil, 'add', overrides.cmdutiladd) |
23782
304e69cb1ee9
largefiles: enable subrepo support for remove
Matt Harbison <matt_harbison@yahoo.com>
parents:
23441
diff
changeset
|
37 extensions.wrapfunction(cmdutil, 'remove', overrides.cmdutilremove) |
23837
2b79d124a12f
largefiles: enable subrepo support for forget
Matt Harbison <matt_harbison@yahoo.com>
parents:
23782
diff
changeset
|
38 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
|
39 |
24230
23438bceba04
largefiles: report the source of copied/moved largefiles in status -C
Matt Harbison <matt_harbison@yahoo.com>
parents:
23886
diff
changeset
|
40 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
|
41 |
16515
12dabc22de77
largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents:
16449
diff
changeset
|
42 # Subrepos call status function |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
43 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
|
44 overrides.overridestatus) |
21084
70252bdfd39c
largefiles: import whole modules instead of importing parts of them
Mads Kiilerich <madski@unity3d.com>
parents:
21052
diff
changeset
|
45 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'status', |
16515
12dabc22de77
largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents:
16449
diff
changeset
|
46 overrides.overridestatusfn) |
12dabc22de77
largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents:
16449
diff
changeset
|
47 |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
48 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
|
49 overrides.overridelog) |
15168 | 50 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
|
51 overrides.overriderollback) |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
52 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
|
53 overrides.overrideverify) |
15168 | 54 |
18547
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
55 verifyopt = [('', 'large', None, |
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
56 _('verify that all largefiles in current revision exists')), |
15168 | 57 ('', 'lfa', None, |
18547
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
58 _('verify largefiles in all revisions, not just current')), |
15168 | 59 ('', 'lfc', None, |
18547
2e3ec9e6ee6e
largefiles: make verify --lfa and --lfc work without --large
Mads Kiilerich <madski@unity3d.com>
parents:
18459
diff
changeset
|
60 _('verify local largefile contents, not just existence'))] |
15168 | 61 entry[1].extend(verifyopt) |
62 | |
18144
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
63 entry = extensions.wrapcommand(commands.table, 'debugstate', |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
64 overrides.overridedebugstate) |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
65 debugstateopt = [('', 'large', None, _('display largefiles dirstate'))] |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
66 entry[1].extend(debugstateopt) |
e16982a74bf7
largefiles: introduce basic debugstate --large functionality
Mads Kiilerich <madski@unity3d.com>
parents:
17878
diff
changeset
|
67 |
21052
cde32cb5a565
largefiles: use "outgoinghooks" to avoid redundant outgoing check
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21048
diff
changeset
|
68 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
|
69 entry = extensions.wrapcommand(commands.table, 'outgoing', outgoing) |
15168 | 70 outgoingopt = [('', 'large', None, _('display outgoing largefiles'))] |
71 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
|
72 cmdutil.outgoinghooks.add('largefiles', overrides.outgoinghook) |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
73 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
|
74 overrides.overridesummary) |
15168 | 75 summaryopt = [('', 'large', None, _('display outgoing largefiles'))] |
76 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
|
77 cmdutil.summaryremotehooks.add('largefiles', overrides.summaryremotehook) |
15168 | 78 |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
79 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
|
80 overrides.overridepull) |
16692
b9969574540a
largefiles: add --all-largefiles flag to pull
Na'Tosha Bard <natosha@unity3d.com>
parents:
16644
diff
changeset
|
81 pullopt = [('', 'all-largefiles', None, |
18982
43cb150e74f9
largefiles: deprecate --all-largefiles for pull
Mads Kiilerich <madski@unity3d.com>
parents:
18980
diff
changeset
|
82 _('download all pulled versions of largefiles (DEPRECATED)')), |
18978
8abaadab9abb
largefiles: introduce pull --lfrev option
Mads Kiilerich <madski@unity3d.com>
parents:
18704
diff
changeset
|
83 ('', 'lfrev', [], |
8abaadab9abb
largefiles: introduce pull --lfrev option
Mads Kiilerich <madski@unity3d.com>
parents:
18704
diff
changeset
|
84 _('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
|
85 entry[1].extend(pullopt) |
18979
1176832fc757
largefiles: introduce pulled() revset expression for use in --lfrev
Mads Kiilerich <madski@unity3d.com>
parents:
18978
diff
changeset
|
86 revset.symbols['pulled'] = overrides.pulledrevsetsymbol |
1176832fc757
largefiles: introduce pulled() revset expression for use in --lfrev
Mads Kiilerich <madski@unity3d.com>
parents:
18978
diff
changeset
|
87 |
16644
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
88 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
|
89 overrides.overrideclone) |
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
90 cloneopt = [('', 'all-largefiles', None, |
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
91 _('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
|
92 entry[1].extend(cloneopt) |
6e2ab601be3f
largefiles: delegate to the wrapped clone command
Matt Harbison <matt_harbison@yahoo.com>
parents:
17192
diff
changeset
|
93 entry = extensions.wrapfunction(hg, 'clone', overrides.hgclone) |
16644
98a9266db803
largefiles: add --all-largefiles flag to clone (issue3188)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16578
diff
changeset
|
94 |
16439
290850e7aa43
largefiles: fix cat for largefiles (issue3352)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16247
diff
changeset
|
95 entry = extensions.wrapcommand(commands.table, 'cat', |
290850e7aa43
largefiles: fix cat for largefiles (issue3352)
Na'Tosha Bard <natosha@unity3d.com>
parents:
16247
diff
changeset
|
96 overrides.overridecat) |
16093
7e30f5f2285f
merge: refactor unknown file conflict checking
Matt Mackall <mpm@selenic.com>
parents:
15944
diff
changeset
|
97 entry = extensions.wrapfunction(merge, '_checkunknownfile', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
98 overrides.overridecheckunknownfile) |
20638
b228ad1f79d7
largefiles: override calculateupdates instead of manifestmerge
Mads Kiilerich <madski@unity3d.com>
parents:
19779
diff
changeset
|
99 entry = extensions.wrapfunction(merge, 'calculateupdates', |
b228ad1f79d7
largefiles: override calculateupdates instead of manifestmerge
Mads Kiilerich <madski@unity3d.com>
parents:
19779
diff
changeset
|
100 overrides.overridecalculateupdates) |
22196
23fe278bde43
largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21084
diff
changeset
|
101 entry = extensions.wrapfunction(merge, 'recordupdates', |
23fe278bde43
largefiles: keep largefiles from colliding with normal one during linear merge
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
21084
diff
changeset
|
102 overrides.mergerecordupdates) |
22288
4e2559841d6c
largefiles: update largefiles even if rebase is aborted by conflict
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22196
diff
changeset
|
103 entry = extensions.wrapfunction(merge, 'update', |
4e2559841d6c
largefiles: update largefiles even if rebase is aborted by conflict
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22196
diff
changeset
|
104 overrides.mergeupdate) |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
105 entry = extensions.wrapfunction(filemerge, 'filemerge', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
106 overrides.overridefilemerge) |
15170
c1a4a3220711
largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents:
15169
diff
changeset
|
107 entry = extensions.wrapfunction(cmdutil, 'copy', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
108 overrides.overridecopy) |
15168 | 109 |
16516
597ddcb41b32
largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents:
16515
diff
changeset
|
110 # Summary calls dirty on the subrepos |
21084
70252bdfd39c
largefiles: import whole modules instead of importing parts of them
Mads Kiilerich <madski@unity3d.com>
parents:
21052
diff
changeset
|
111 entry = extensions.wrapfunction(subrepo.hgsubrepo, 'dirty', |
16516
597ddcb41b32
largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents:
16515
diff
changeset
|
112 overrides.overridedirty) |
597ddcb41b32
largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents:
16515
diff
changeset
|
113 |
24436
66a69da9cde4
largefiles: override cmdutil.revert() instead of comands.revert()
Martin von Zweigbergk <martinvonz@google.com>
parents:
24230
diff
changeset
|
114 entry = extensions.wrapfunction(cmdutil, 'revert', |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
115 overrides.overriderevert) |
15168 | 116 |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
117 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
|
118 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
|
119 overrides.hgsubrepoarchive) |
15349
63455eb771af
largefiles: drop more unnecessary compatibility checks
Greg Ward <greg@gerg.ca>
parents:
15295
diff
changeset
|
120 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
|
121 overrides.overridebailifchanged) |
15168 | 122 |
22289
e26df4e774f6
largefiles: update largefiles even if transplant is aborted by conflict
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22288
diff
changeset
|
123 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
|
124 overrides.scmutilmarktouched) |
e26df4e774f6
largefiles: update largefiles even if transplant is aborted by conflict
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22288
diff
changeset
|
125 |
15168 | 126 # create the new wireproto commands ... |
127 wireproto.commands['putlfile'] = (proto.putlfile, 'sha') | |
128 wireproto.commands['getlfile'] = (proto.getlfile, 'sha') | |
129 wireproto.commands['statlfile'] = (proto.statlfile, 'sha') | |
130 | |
131 # ... and wrap some existing ones | |
132 wireproto.commands['capabilities'] = (proto.capabilities, '') | |
133 wireproto.commands['heads'] = (proto.heads, '') | |
134 wireproto.commands['lheads'] = (wireproto.heads, '') | |
135 | |
15254
dd03d3a9f888
largefiles: more work on cleaning up comments
Greg Ward <greg@gerg.ca>
parents:
15252
diff
changeset
|
136 # make putlfile behave the same as push and {get,stat}lfile behave |
dd03d3a9f888
largefiles: more work on cleaning up comments
Greg Ward <greg@gerg.ca>
parents:
15252
diff
changeset
|
137 # the same as pull w.r.t. permissions checks |
15168 | 138 hgweb_mod.perms['putlfile'] = 'push' |
139 hgweb_mod.perms['getlfile'] = 'pull' | |
140 hgweb_mod.perms['statlfile'] = 'pull' | |
141 | |
16449
874a680a3e23
largefiles: hide .hglf/ prefix for largefiles in hgweb
Martin Geisler <mg@lazybytes.net>
parents:
16439
diff
changeset
|
142 extensions.wrapfunction(webcommands, 'decodepath', overrides.decodepath) |
874a680a3e23
largefiles: hide .hglf/ prefix for largefiles in hgweb
Martin Geisler <mg@lazybytes.net>
parents:
16439
diff
changeset
|
143 |
15168 | 144 # the hello wireproto command uses wireproto.capabilities, so it won't see |
145 # our largefiles capability unless we replace the actual function as well. | |
16247
d87d9d8a8e03
largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents:
16093
diff
changeset
|
146 proto.capabilitiesorig = wireproto.capabilities |
15168 | 147 wireproto.capabilities = proto.capabilities |
148 | |
149 # can't do this in reposetup because it needs to have happened before | |
150 # wirerepo.__init__ is called | |
17192
1ac628cd7113
peer: introduce real peer classes
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
16692
diff
changeset
|
151 proto.ssholdcallstream = sshpeer.sshpeer._callstream |
1ac628cd7113
peer: introduce real peer classes
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
16692
diff
changeset
|
152 proto.httpoldcallstream = httppeer.httppeer._callstream |
1ac628cd7113
peer: introduce real peer classes
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
16692
diff
changeset
|
153 sshpeer.sshpeer._callstream = proto.sshrepocallstream |
1ac628cd7113
peer: introduce real peer classes
Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
parents:
16692
diff
changeset
|
154 httppeer.httppeer._callstream = proto.httprepocallstream |
15168 | 155 |
156 # override some extensions' stuff as well | |
157 for name, module in extensions.extensions(): | |
158 if name == 'purge': | |
159 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
|
160 overrides.overridepurge) |
15168 | 161 if name == 'rebase': |
162 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
|
163 overrides.overriderebase) |
23182
9b6c3947b4a7
largefiles: wrap "rebase.rebase" for functions using it directly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22289
diff
changeset
|
164 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
|
165 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
|
166 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
|
167 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
|
168 overrides.overridetransplant) |