hgext/largefiles/uisetup.py
author Matt Harbison <matt_harbison@yahoo.com>
Thu, 03 May 2012 21:32:57 -0400
changeset 16578 43fb170a23bd
parent 16516 597ddcb41b32
child 16644 98a9266db803
permissions -rw-r--r--
largefiles: make archive -S store largefiles instead of standins This is essentially a copy of largefile's override of archive() in the archival class, adapted for overriding hgsubrepo's archive(). That means decoding isn't taken into consideration, nor is .hg_archival.txt generated (the same goes for regular subrepos). Unlike subrepos, but consistent with largefile's handling of the top repo, ui.progress() is *not* called. This should probably be refactored at some point, but at least this generates the archives properly for now. Previously, the standins were ignored and the largefiles were archived only for the top level repo. Long term, it would probably be most desirable to figure out how to tweak archival's archive() if necessary such that largefiles doesn't need to override it completely just to special case the translating of standins to the real files. Largefiles will already return a context with the true largefiles instead of the standins if lfilesrepo's lfstatus is True- perhaps this can be leveraged?
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     1
# Copyright 2009-2010 Gregory P. Ward
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     2
# Copyright 2009-2010 Intelerad Medical Systems Incorporated
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     3
# Copyright 2010-2011 Fog Creek Software
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     4
# Copyright 2010-2011 Unity Technologies
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     5
#
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     6
# This software may be used and distributed according to the terms of the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     7
# GNU General Public License version 2 or any later version.
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     8
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
     9
'''setup for largefiles extension: uisetup'''
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    10
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    11
from mercurial import archival, cmdutil, commands, extensions, filemerge, hg, \
15663
9036c7d106bf largefiles: handle merges between normal files and largefiles (issue3084)
Martin Geisler <mg@aragost.com>
parents: 15383
diff changeset
    12
    httprepo, localrepo, merge, sshrepo, sshserver, wireproto
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    13
from mercurial.i18n import _
16449
874a680a3e23 largefiles: hide .hglf/ prefix for largefiles in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 16439
diff changeset
    14
from mercurial.hgweb import hgweb_mod, protocol, webcommands
16515
12dabc22de77 largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents: 16449
diff changeset
    15
from mercurial.subrepo import hgsubrepo
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    16
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    17
import overrides
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    18
import proto
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    19
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    20
def uisetup(ui):
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    21
    # Disable auto-status for some commands which assume that all
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    22
    # files in the result are under Mercurial's control
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    23
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    24
    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
    25
                                   overrides.overrideadd)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    26
    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
    27
              ('', 'normal', None, _('add as normal file')),
15627
9d7a83a42f8c largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents: 15383
diff changeset
    28
              ('', 'lfsize', '', _('add all files above this size '
9d7a83a42f8c largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents: 15383
diff changeset
    29
                                   '(in megabytes) as largefiles '
9d7a83a42f8c largefiles: fix indentation
Martin Geisler <mg@aragost.com>
parents: 15383
diff changeset
    30
                                   '(default: 10)'))]
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    31
    entry[1].extend(addopt)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    32
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    33
    entry = extensions.wrapcommand(commands.table, 'addremove',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    34
            overrides.overrideaddremove)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    35
    entry = extensions.wrapcommand(commands.table, 'remove',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    36
                                   overrides.overrideremove)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    37
    entry = extensions.wrapcommand(commands.table, 'forget',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    38
                                   overrides.overrideforget)
16515
12dabc22de77 largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents: 16449
diff changeset
    39
12dabc22de77 largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents: 16449
diff changeset
    40
    # Subrepos call status function
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    41
    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
    42
                                   overrides.overridestatus)
16515
12dabc22de77 largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents: 16449
diff changeset
    43
    entry = extensions.wrapfunction(hgsubrepo, 'status',
12dabc22de77 largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents: 16449
diff changeset
    44
                                    overrides.overridestatusfn)
12dabc22de77 largefiles: fix status -S reporting of subrepos (issue3231)
Matt Harbison <matt_harbison@yahoo.com>
parents: 16449
diff changeset
    45
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    46
    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
    47
                                   overrides.overridelog)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    48
    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
    49
                                   overrides.overriderollback)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    50
    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
    51
                                   overrides.overrideverify)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    52
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    53
    verifyopt = [('', 'large', None, _('verify largefiles')),
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    54
                 ('', 'lfa', None,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    55
                     _('verify all revisions of largefiles not just current')),
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    56
                 ('', 'lfc', None,
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    57
                     _('verify largefile contents not just existence'))]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    58
    entry[1].extend(verifyopt)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    59
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    60
    entry = extensions.wrapcommand(commands.table, 'outgoing',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    61
        overrides.overrideoutgoing)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    62
    outgoingopt = [('', 'large', None, _('display outgoing largefiles'))]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    63
    entry[1].extend(outgoingopt)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    64
    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
    65
                                   overrides.overridesummary)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    66
    summaryopt = [('', 'large', None, _('display outgoing largefiles'))]
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    67
    entry[1].extend(summaryopt)
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    68
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    69
    entry = extensions.wrapcommand(commands.table, 'update',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    70
                                   overrides.overrideupdate)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    71
    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
    72
                                   overrides.overridepull)
16439
290850e7aa43 largefiles: fix cat for largefiles (issue3352)
Na'Tosha Bard <natosha@unity3d.com>
parents: 16247
diff changeset
    73
    entry = extensions.wrapcommand(commands.table, 'cat',
290850e7aa43 largefiles: fix cat for largefiles (issue3352)
Na'Tosha Bard <natosha@unity3d.com>
parents: 16247
diff changeset
    74
                                   overrides.overridecat)
16093
7e30f5f2285f merge: refactor unknown file conflict checking
Matt Mackall <mpm@selenic.com>
parents: 15944
diff changeset
    75
    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
    76
                                    overrides.overridecheckunknownfile)
15663
9036c7d106bf largefiles: handle merges between normal files and largefiles (issue3084)
Martin Geisler <mg@aragost.com>
parents: 15383
diff changeset
    77
    entry = extensions.wrapfunction(merge, 'manifestmerge',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    78
                                    overrides.overridemanifestmerge)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    79
    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
    80
                                    overrides.overridefilemerge)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    81
    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
    82
                                    overrides.overridecopy)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    83
16516
597ddcb41b32 largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents: 16515
diff changeset
    84
    # Summary calls dirty on the subrepos
597ddcb41b32 largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents: 16515
diff changeset
    85
    entry = extensions.wrapfunction(hgsubrepo, 'dirty',
597ddcb41b32 largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents: 16515
diff changeset
    86
                                    overrides.overridedirty)
597ddcb41b32 largefiles: notice dirty large files in a subrepo
Matt Harbison <matt_harbison@yahoo.com>
parents: 16515
diff changeset
    87
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    88
    # Backout calls revert so we need to override both the command and the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    89
    # function
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    90
    entry = extensions.wrapcommand(commands.table, 'revert',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    91
                                   overrides.overriderevert)
15170
c1a4a3220711 largefiles: fix over-long lines
Matt Mackall <mpm@selenic.com>
parents: 15169
diff changeset
    92
    entry = extensions.wrapfunction(commands, 'revert',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    93
                                    overrides.overriderevert)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    94
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    95
    # clone uses hg._update instead of hg.update even though they are the
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
    96
    # same function... so wrap both of them)
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    97
    extensions.wrapfunction(hg, 'update', overrides.hgupdate)
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    98
    extensions.wrapfunction(hg, '_update', overrides.hgupdate)
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
    99
    extensions.wrapfunction(hg, 'clean', overrides.hgclean)
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   100
    extensions.wrapfunction(hg, 'merge', overrides.hgmerge)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   101
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   102
    extensions.wrapfunction(archival, 'archive', overrides.overridearchive)
16578
43fb170a23bd largefiles: make archive -S store largefiles instead of standins
Matt Harbison <matt_harbison@yahoo.com>
parents: 16516
diff changeset
   103
    extensions.wrapfunction(hgsubrepo, 'archive', overrides.hgsubrepoarchive)
15349
63455eb771af largefiles: drop more unnecessary compatibility checks
Greg Ward <greg@gerg.ca>
parents: 15295
diff changeset
   104
    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
   105
                            overrides.overridebailifchanged)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   106
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   107
    # create the new wireproto commands ...
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   108
    wireproto.commands['putlfile'] = (proto.putlfile, 'sha')
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   109
    wireproto.commands['getlfile'] = (proto.getlfile, 'sha')
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   110
    wireproto.commands['statlfile'] = (proto.statlfile, 'sha')
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   111
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   112
    # ... and wrap some existing ones
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   113
    wireproto.commands['capabilities'] = (proto.capabilities, '')
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   114
    wireproto.commands['heads'] = (proto.heads, '')
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   115
    wireproto.commands['lheads'] = (wireproto.heads, '')
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   116
15254
dd03d3a9f888 largefiles: more work on cleaning up comments
Greg Ward <greg@gerg.ca>
parents: 15252
diff changeset
   117
    # 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
   118
    # the same as pull w.r.t. permissions checks
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   119
    hgweb_mod.perms['putlfile'] = 'push'
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   120
    hgweb_mod.perms['getlfile'] = 'pull'
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   121
    hgweb_mod.perms['statlfile'] = 'pull'
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   122
16449
874a680a3e23 largefiles: hide .hglf/ prefix for largefiles in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 16439
diff changeset
   123
    extensions.wrapfunction(webcommands, 'decodepath', overrides.decodepath)
874a680a3e23 largefiles: hide .hglf/ prefix for largefiles in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 16439
diff changeset
   124
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   125
    # the hello wireproto command uses wireproto.capabilities, so it won't see
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   126
    # 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
   127
    proto.capabilitiesorig = wireproto.capabilities
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   128
    wireproto.capabilities = proto.capabilities
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   129
15252
6e809bb4f969 largefiles: improve comments, internal docstrings
Greg Ward <greg@gerg.ca>
parents: 15188
diff changeset
   130
    # these let us reject non-largefiles clients and make them display
6e809bb4f969 largefiles: improve comments, internal docstrings
Greg Ward <greg@gerg.ca>
parents: 15188
diff changeset
   131
    # our error messages
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   132
    protocol.webproto.refuseclient = proto.webprotorefuseclient
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   133
    sshserver.sshserver.refuseclient = proto.sshprotorefuseclient
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   134
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   135
    # can't do this in reposetup because it needs to have happened before
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   136
    # wirerepo.__init__ is called
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   137
    proto.ssholdcallstream = sshrepo.sshrepository._callstream
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   138
    proto.httpoldcallstream = httprepo.httprepository._callstream
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   139
    sshrepo.sshrepository._callstream = proto.sshrepocallstream
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   140
    httprepo.httprepository._callstream = proto.httprepocallstream
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   141
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   142
    # don't die on seeing a repo with the largefiles requirement
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   143
    localrepo.localrepository.supported |= set(['largefiles'])
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   144
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   145
    # override some extensions' stuff as well
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   146
    for name, module in extensions.extensions():
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   147
        if name == 'fetch':
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   148
            extensions.wrapcommand(getattr(module, 'cmdtable'), 'fetch',
16247
d87d9d8a8e03 largefiles: remove use of underscores that breaks coding convention
Na'Tosha Bard <natosha@unity3d.com>
parents: 16093
diff changeset
   149
                overrides.overridefetch)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   150
        if name == 'purge':
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   151
            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
   152
                overrides.overridepurge)
15168
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   153
        if name == 'rebase':
cfccd3bee7b3 hgext: add largefiles extension
various
parents:
diff changeset
   154
            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
   155
                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
   156
        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
   157
            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
   158
                overrides.overridetransplant)