largefiles: always consider updatelfiles 'checked' parameter set
authorMads Kiilerich <madski@unity3d.com>
Sat, 17 Jan 2015 03:34:57 +0100
changeset 24788 b8c3a0994b37
parent 24787 9d5c27890790
child 24789 0b1577c892f2
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.
hgext/largefiles/lfcommands.py
hgext/largefiles/overrides.py
--- 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
--- a/hgext/largefiles/overrides.py	Wed Apr 15 15:22:16 2015 -0400
+++ b/hgext/largefiles/overrides.py	Sat Jan 17 03:34:57 2015 +0100
@@ -1348,7 +1348,7 @@
             filelist.extend(s.deleted + s.removed)
 
         lfcommands.updatelfiles(repo.ui, repo, filelist=filelist,
-                                normallookup=partial, checked=True)
+                                normallookup=partial)
 
         return result
     finally: