diff hgext/largefiles/localstore.py @ 18155:5206af8894a3

largefiles: cleanup of warnings on errors getting largefiles Especially the "no default or default-push path set in hgrc" was often very misleading and didn't give any hint where it actually was looking. A long error messages is better than several multi-line messages.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 13 Dec 2012 19:19:06 +0100
parents fbb732a8f2b9
children a49b7c9fc246
line wrap: on
line diff
--- a/hgext/largefiles/localstore.py	Thu Dec 13 19:19:06 2012 +0100
+++ b/hgext/largefiles/localstore.py	Thu Dec 13 19:19:06 2012 +0100
@@ -22,9 +22,8 @@
     the user cache.'''
 
     def __init__(self, ui, repo, remote):
-        url = os.path.join(remote.local().path, '.hg', lfutil.longname)
-        super(localstore, self).__init__(ui, repo, util.expandpath(url))
         self.remote = remote.local()
+        super(localstore, self).__init__(ui, repo, self.remote.url())
 
     def put(self, source, hash):
         util.makedirs(os.path.dirname(lfutil.storepath(self.remote, hash)))
@@ -46,7 +45,7 @@
         elif lfutil.inusercache(self.ui, hash):
             path = lfutil.usercachepath(self.ui, hash)
         else:
-            raise basestore.StoreError(filename, hash, '',
+            raise basestore.StoreError(filename, hash, self.url,
                 _("can't get file locally"))
         fd = open(path, 'rb')
         try: