Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
29420:e5c91dc909f7 | 29421:ecbbf4d56ee8 |
---|---|
45 return lfutil.copyandhash(fd, tmpfile) | 45 return lfutil.copyandhash(fd, tmpfile) |
46 | 46 |
47 def _verifyfiles(self, contents, filestocheck): | 47 def _verifyfiles(self, contents, filestocheck): |
48 failed = False | 48 failed = False |
49 for cset, filename, expectedhash in filestocheck: | 49 for cset, filename, expectedhash in filestocheck: |
50 storepath, exists = lfutil.findstorepath(self.remote, expectedhash) | 50 storepath, exists = lfutil.findstorepath(self.repo, expectedhash) |
51 if not exists: | |
52 storepath, exists = lfutil.findstorepath( | |
53 self.remote, expectedhash) | |
51 if not exists: | 54 if not exists: |
52 self.ui.warn( | 55 self.ui.warn( |
53 _('changeset %s: %s references missing %s\n') | 56 _('changeset %s: %s references missing %s\n') |
54 % (cset, filename, storepath)) | 57 % (cset, filename, storepath)) |
55 failed = True | 58 failed = True |