comparison mercurial/localrepo.py @ 1630:5ecf05541e11

This fixes a bug that Chris Mason found. As for a test case, I can't think of one. It's a very weird case. Basically, if there is a file listed as changed in the changelog entry, but not showing up in any of the associated manifest entries, hg would abort when trying to create a changeset. Now it just decides the file must not have any versions relevant to the changeset.
author Eric Hopper <hopper@omnifarious.org>
date Fri, 20 Jan 2006 09:35:43 -0800
parents ee16f06174bd
children 3f214984fd9e
comparison
equal deleted inserted replaced
1627:11cd38286fdb 1630:5ecf05541e11
1200 # Go through all our files in order sorted by name. 1200 # Go through all our files in order sorted by name.
1201 for fname in changedfiles: 1201 for fname in changedfiles:
1202 filerevlog = self.file(fname) 1202 filerevlog = self.file(fname)
1203 # Toss out the filenodes that the recipient isn't really 1203 # Toss out the filenodes that the recipient isn't really
1204 # missing. 1204 # missing.
1205 prune_filenodes(fname, filerevlog) 1205 if msng_filenode_set.has_key(fname):
1206 msng_filenode_lst = msng_filenode_set[fname].keys() 1206 prune_filenodes(fname, filerevlog)
1207 msng_filenode_lst = msng_filenode_set[fname].keys()
1208 else:
1209 msng_filenode_lst = []
1207 # If any filenodes are left, generate the group for them, 1210 # If any filenodes are left, generate the group for them,
1208 # otherwise don't bother. 1211 # otherwise don't bother.
1209 if len(msng_filenode_lst) > 0: 1212 if len(msng_filenode_lst) > 0:
1210 yield struct.pack(">l", len(fname) + 4) + fname 1213 yield struct.pack(">l", len(fname) + 4) + fname
1211 # Sort the filenodes by their revision # 1214 # Sort the filenodes by their revision #
1215 # from filenodes. 1218 # from filenodes.
1216 group = filerevlog.group(msng_filenode_lst, 1219 group = filerevlog.group(msng_filenode_lst,
1217 lookup_filenode_link_func(fname)) 1220 lookup_filenode_link_func(fname))
1218 for chnk in group: 1221 for chnk in group:
1219 yield chnk 1222 yield chnk
1220 # Don't need this anymore, toss it to free memory. 1223 if msng_filenode_set.has_key(fname):
1221 del msng_filenode_set[fname] 1224 # Don't need this anymore, toss it to free memory.
1225 del msng_filenode_set[fname]
1222 # Signal that no more groups are left. 1226 # Signal that no more groups are left.
1223 yield struct.pack(">l", 0) 1227 yield struct.pack(">l", 0)
1224 1228
1225 return util.chunkbuffer(gengroup()) 1229 return util.chunkbuffer(gengroup())
1226 1230