diff hgext/largefiles/lfcommands.py @ 24788:b8c3a0994b37

largefiles: always consider updatelfiles 'checked' parameter set mergeupdate already set the flag to update all. This will thus only change overriderevert and scmutilmarktouched ... where the flag effectually also were true. The test coverage thus shows no change. As the flag always is set, it is removed. This is mainly a change for keeping the code simple and consistent and correct, but it should also make it faster in many cases.
author Mads Kiilerich <madski@unity3d.com>
date Sat, 17 Jan 2015 03:34:57 +0100
parents d8e0c591781c
children fcd2f9b06629
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Wed Apr 15 15:22:16 2015 -0400
+++ b/hgext/largefiles/lfcommands.py	Sat Jan 17 03:34:57 2015 +0100
@@ -437,7 +437,7 @@
     return totalsuccess, totalmissing
 
 def updatelfiles(ui, repo, filelist=None, printmessage=None,
-                 normallookup=False, checked=False):
+                 normallookup=False):
     '''Update largefiles according to standins in the working directory
 
     If ``printmessage`` is other than ``None``, it means "print (or
@@ -464,10 +464,7 @@
                     shutil.copyfile(abslfile, abslfile + '.orig')
                     util.unlinkpath(absstandin + '.orig')
                 expecthash = lfutil.readstandin(repo, lfile)
-                if (expecthash != '' and
-                    (checked or
-                     not os.path.exists(abslfile) or
-                     expecthash != lfutil.hashfile(abslfile))):
+                if expecthash != '':
                     if lfile not in repo[None]: # not switched to normal file
                         util.unlinkpath(abslfile, ignoremissing=True)
                     # use normallookup() to allocate an entry in largefiles