comparison mercurial/metadata.py @ 46618:dde86beca388

copies: tests and fix parallel computation of changed file information The code was mixing variable name and misbehaving in some case. This changeset fix it and also add a tests to validate it does not regress. Without the fix, the parallel-upgrade misbehavior in random ways. Differential Revision: https://phab.mercurial-scm.org/D10084
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 01 Mar 2021 20:08:26 +0100
parents 59fa3890d40a
children bc2519513ae0
comparison
equal deleted inserted replaced
46617:87f8b3add56b 46618:dde86beca388
880 880
881 def sidedata_companion(revlog, rev): 881 def sidedata_companion(revlog, rev):
882 data = {}, False 882 data = {}, False
883 if util.safehasattr(revlog, b'filteredrevs'): # this is a changelog 883 if util.safehasattr(revlog, b'filteredrevs'): # this is a changelog
884 # Is the data previously shelved ? 884 # Is the data previously shelved ?
885 sidedata = staging.pop(rev, None) 885 data = staging.pop(rev, None)
886 if sidedata is None: 886 if data is None:
887 # look at the queued result until we find the one we are lookig 887 # look at the queued result until we find the one we are lookig
888 # for (shelve the other ones) 888 # for (shelve the other ones)
889 r, data = sidedataq.get() 889 r, data = sidedataq.get()
890 while r != rev: 890 while r != rev:
891 staging[r] = data 891 staging[r] = data
892 r, sidedata = sidedataq.get() 892 r, data = sidedataq.get()
893 tokens.release() 893 tokens.release()
894 sidedata, has_copies_info = data 894 sidedata, has_copies_info = data
895 new_flag = 0 895 new_flag = 0
896 if has_copies_info: 896 if has_copies_info:
897 new_flag = sidedataflag.REVIDX_HASCOPIESINFO 897 new_flag = sidedataflag.REVIDX_HASCOPIESINFO