diff hgext/largefiles/localstore.py @ 29421:ecbbf4d56ee8

largefiles: check file in the repo store before checking remotely (issue5257) Problem was files to check were gathered in the repository where the verify was launched but verification was done on the remote store. It was observed when user committed in cloned repository and ran verify before pushing - committed files were marked as non existing. This commit fixes this by checking in the remote store only files that are not existing in the repository store where verify was launched. Solution is similiar to fd288d118074
author liscju <piotr.listkiewicz@gmail.com>
date Thu, 23 Jun 2016 22:37:17 +0200
parents d2c375071d16
children 736f92c44656
line wrap: on
line diff
--- a/hgext/largefiles/localstore.py	Mon Jun 27 10:33:33 2016 +0200
+++ b/hgext/largefiles/localstore.py	Thu Jun 23 22:37:17 2016 +0200
@@ -47,7 +47,10 @@
     def _verifyfiles(self, contents, filestocheck):
         failed = False
         for cset, filename, expectedhash in filestocheck:
-            storepath, exists = lfutil.findstorepath(self.remote, expectedhash)
+            storepath, exists = lfutil.findstorepath(self.repo, expectedhash)
+            if not exists:
+                storepath, exists = lfutil.findstorepath(
+                    self.remote, expectedhash)
             if not exists:
                 self.ui.warn(
                     _('changeset %s: %s references missing %s\n')