largefiles: 'put' should store 'source' file in under 'hash', also in localstore
authorMads Kiilerich <madski@unity3d.com>
Mon, 15 Apr 2013 23:34:36 +0200
changeset 19007 266b5fb72f26
parent 19006 0b3b84222a2d
child 19008 9d33d6e0d442
largefiles: 'put' should store 'source' file in under 'hash', also in localstore
hgext/largefiles/basestore.py
hgext/largefiles/localstore.py
--- a/hgext/largefiles/basestore.py	Tue Apr 16 04:35:10 2013 +0200
+++ b/hgext/largefiles/basestore.py	Mon Apr 15 23:34:36 2013 +0200
@@ -38,7 +38,7 @@
         self.url = url
 
     def put(self, source, hash):
-        '''Put source file into the store under <filename>/<hash>.'''
+        '''Put source file into the store so it can be retrieved by hash.'''
         raise NotImplementedError('abstract method')
 
     def exists(self, hashes):
--- a/hgext/largefiles/localstore.py	Tue Apr 16 04:35:10 2013 +0200
+++ b/hgext/largefiles/localstore.py	Mon Apr 15 23:34:36 2013 +0200
@@ -25,8 +25,7 @@
     def put(self, source, hash):
         if lfutil.instore(self.remote, hash):
             return
-        lfutil.link(lfutil.storepath(self.repo, hash),
-                lfutil.storepath(self.remote, hash))
+        lfutil.link(source, lfutil.storepath(self.remote, hash))
 
     def exists(self, hashes):
         retval = {}