# HG changeset patch # User Mads Kiilerich # Date 1366061743 -7200 # Node ID eaf146e811a44af12b3a9cbf053117d142f258e4 # Parent c1b5f9c4d989e9727217c704ed9c1fed39e04399 largefiles: refactoring - use findfile in localstore._getfile diff -r c1b5f9c4d989 -r eaf146e811a4 hgext/largefiles/localstore.py --- a/hgext/largefiles/localstore.py Mon Apr 15 23:35:18 2013 +0200 +++ b/hgext/largefiles/localstore.py Mon Apr 15 23:35:43 2013 +0200 @@ -36,11 +36,8 @@ def _getfile(self, tmpfile, filename, hash): - if lfutil.instore(self.remote, hash): - path = lfutil.storepath(self.remote, hash) - elif lfutil.inusercache(self.ui, hash): - path = lfutil.usercachepath(self.ui, hash) - else: + path = lfutil.findfile(self.remote, hash) + if not path: raise basestore.StoreError(filename, hash, self.url, _("can't get file locally")) fd = open(path, 'rb')