hgext/largefiles/basestore.py
changeset 26587 56b2bcea2529
parent 25660 328739ea70c3
child 28463 19b4a2087dfc
equal deleted inserted replaced
26586:d51c658d3f04 26587:56b2bcea2529
     8 
     8 
     9 '''base class for store implementations and store-related utility code'''
     9 '''base class for store implementations and store-related utility code'''
    10 
    10 
    11 import re
    11 import re
    12 
    12 
    13 from mercurial import util, node, hg
    13 from mercurial import util, node, hg, error
    14 from mercurial.i18n import _
    14 from mercurial.i18n import _
    15 
    15 
    16 import lfutil
    16 import lfutil
    17 
    17 
    18 class StoreError(Exception):
    18 class StoreError(Exception):
   207         scheme = match.group(1)
   207         scheme = match.group(1)
   208 
   208 
   209     try:
   209     try:
   210         storeproviders = _storeprovider[scheme]
   210         storeproviders = _storeprovider[scheme]
   211     except KeyError:
   211     except KeyError:
   212         raise util.Abort(_('unsupported URL scheme %r') % scheme)
   212         raise error.Abort(_('unsupported URL scheme %r') % scheme)
   213 
   213 
   214     for classobj in storeproviders:
   214     for classobj in storeproviders:
   215         try:
   215         try:
   216             return classobj(ui, repo, remote)
   216             return classobj(ui, repo, remote)
   217         except lfutil.storeprotonotcapable:
   217         except lfutil.storeprotonotcapable:
   218             pass
   218             pass
   219 
   219 
   220     raise util.Abort(_('%s does not appear to be a largefile store') %
   220     raise error.Abort(_('%s does not appear to be a largefile store') %
   221                      util.hidepassword(path))
   221                      util.hidepassword(path))