Patchwork [7,of,8] largefiles: fix misleading comments in lfutil instore and storepath

login
register
mail settings
Submitter Pulkit Goyal
Date June 27, 2016, 1:43 p.m.
Message ID <4aa1009ed6f3066874b3.1467034998@pulkit-goyal>
Download mbox | patch
Permalink /patch/15642/
State Not Applicable
Headers show

Comments

Pulkit Goyal - June 27, 2016, 1:43 p.m.
# HG changeset patch
# User liscju <piotr.listkiewicz@gmail.com>
# Date 1466752096 -7200
#      Fri Jun 24 09:08:16 2016 +0200
# Node ID 4aa1009ed6f3066874b3937ed77df144fe21efde
# Parent  25737d5695e2da9631e37ae304beabeb010ccf8f
largefiles: fix misleading comments in lfutil instore and storepath

Problem in both cases is cache in largefiles has assigned
meaning - user cache which is additional place to get/put
files. Those two function works on store - the main place
to store largefiles in the repository - .hg/largefiles and
using "cache" to describe it is misleading.

Patch

diff -r 25737d5695e2 -r 4aa1009ed6f3 hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py	Sat Jun 25 19:10:46 2016 -0700
+++ b/hgext/largefiles/lfutil.py	Fri Jun 24 09:08:16 2016 +0200
@@ -190,12 +190,11 @@ 
             if rev is not None or repo.dirstate[f] != '?']
 
 def instore(repo, hash, forcelocal=False):
-    '''Return true if a largefile with the given hash exists in the user
-    cache.'''
+    '''Return true if a largefile with the given hash exists in the store'''
     return os.path.exists(storepath(repo, hash, forcelocal))
 
 def storepath(repo, hash, forcelocal=False):
-    '''Return the correct location in the repository largefiles cache for a
+    '''Return the correct location in the repository largefiles store for a
     file with the given hash.'''
     if not forcelocal and repo.shared():
         return repo.vfs.reljoin(repo.sharedpath, longname, hash)