hgext/share.py
changeset 34497 f9734580f2b6
parent 33515 3325c7dcabaa
child 34498 308aa280ed82
equal deleted inserted replaced
34496:18cd210535b3 34497:f9734580f2b6
    61 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    61 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    62 # be specifying the version(s) of Mercurial they are tested with, or
    62 # be specifying the version(s) of Mercurial they are tested with, or
    63 # leave the attribute unspecified.
    63 # leave the attribute unspecified.
    64 testedwith = 'ships-with-hg-core'
    64 testedwith = 'ships-with-hg-core'
    65 
    65 
       
    66 configtable = {}
       
    67 configitem = registrar.configitem(configtable)
       
    68 
       
    69 configitem('share', 'pool',
       
    70     default=None,
       
    71 )
       
    72 
    66 @command('share',
    73 @command('share',
    67     [('U', 'noupdate', None, _('do not create a working directory')),
    74     [('U', 'noupdate', None, _('do not create a working directory')),
    68      ('B', 'bookmarks', None, _('also share bookmarks')),
    75      ('B', 'bookmarks', None, _('also share bookmarks')),
    69      ('', 'relative', None, _('point to source using a relative path '
    76      ('', 'relative', None, _('point to source using a relative path '
    70                               '(EXPERIMENTAL)')),
    77                               '(EXPERIMENTAL)')),
   126     # update store, spath, svfs and sjoin of repo
   133     # update store, spath, svfs and sjoin of repo
   127     repo.unfiltered().__init__(repo.baseui, repo.root)
   134     repo.unfiltered().__init__(repo.baseui, repo.root)
   128 
   135 
   129 # Wrap clone command to pass auto share options.
   136 # Wrap clone command to pass auto share options.
   130 def clone(orig, ui, source, *args, **opts):
   137 def clone(orig, ui, source, *args, **opts):
   131     pool = ui.config('share', 'pool', None)
   138     pool = ui.config('share', 'pool')
   132     if pool:
   139     if pool:
   133         pool = util.expandpath(pool)
   140         pool = util.expandpath(pool)
   134 
   141 
   135     opts[r'shareopts'] = {
   142     opts[r'shareopts'] = {
   136         'pool': pool,
   143         'pool': pool,