hgext/largefiles/basestore.py
branchstable
changeset 19950 cce7ab960312
parent 19918 ae65192fd6b4
child 23941 164bd5218ddb
equal deleted inserted replaced
19949:29f12a7a03ee 19950:cce7ab960312
    24         self.url = url
    24         self.url = url
    25         self.detail = detail
    25         self.detail = detail
    26 
    26 
    27     def longmessage(self):
    27     def longmessage(self):
    28         return (_("error getting id %s from url %s for file %s: %s\n") %
    28         return (_("error getting id %s from url %s for file %s: %s\n") %
    29                  (self.hash, self.url, self.filename, self.detail))
    29                  (self.hash, util.hidepassword(self.url), self.filename,
       
    30                   self.detail))
    30 
    31 
    31     def __str__(self):
    32     def __str__(self):
    32         return "%s: %s" % (self.url, self.detail)
    33         return "%s: %s" % (util.hidepassword(self.url), self.detail)
    33 
    34 
    34 class basestore(object):
    35 class basestore(object):
    35     def __init__(self, ui, repo, url):
    36     def __init__(self, ui, repo, url):
    36         self.ui = ui
    37         self.ui = ui
    37         self.repo = repo
    38         self.repo = repo
    67             at += 1
    68             at += 1
    68             ui.note(_('getting %s:%s\n') % (filename, hash))
    69             ui.note(_('getting %s:%s\n') % (filename, hash))
    69 
    70 
    70             if not available.get(hash):
    71             if not available.get(hash):
    71                 ui.warn(_('%s: largefile %s not available from %s\n')
    72                 ui.warn(_('%s: largefile %s not available from %s\n')
    72                         % (filename, hash, self.url))
    73                         % (filename, hash, util.hidepassword(self.url)))
    73                 missing.append(filename)
    74                 missing.append(filename)
    74                 continue
    75                 continue
    75 
    76 
    76             if self._gethash(filename, hash):
    77             if self._gethash(filename, hash):
    77                 success.append((filename, hash))
    78                 success.append((filename, hash))
   212         try:
   213         try:
   213             return classobj(ui, repo, remote)
   214             return classobj(ui, repo, remote)
   214         except lfutil.storeprotonotcapable:
   215         except lfutil.storeprotonotcapable:
   215             pass
   216             pass
   216 
   217 
   217     raise util.Abort(_('%s does not appear to be a largefile store') % path)
   218     raise util.Abort(_('%s does not appear to be a largefile store') %
       
   219                      util.hidepassword(path))