Mercurial > hg
comparison mercurial/changegroup.py @ 29938:a059b17352ef
manifest: add manifestctx.readdelta()
This adds an implementation of readdelta to the new manifestctx class and adds a
couple consumers of it. This currently appears to have some duplicate code, but
future patches cause this function to diverge when things like "shallow" are
introduced.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 13 Sep 2016 16:25:21 -0700 |
parents | 8d226db31f20 |
children | edb49a90723c |
comparison
equal
deleted
inserted
replaced
29937:2c302c654451 | 29938:a059b17352ef |
---|---|
330 if repo.ui.configbool('server', 'validate', default=False): | 330 if repo.ui.configbool('server', 'validate', default=False): |
331 # validate incoming csets have their manifests | 331 # validate incoming csets have their manifests |
332 for cset in xrange(clstart, clend): | 332 for cset in xrange(clstart, clend): |
333 mfnode = repo.changelog.read( | 333 mfnode = repo.changelog.read( |
334 repo.changelog.node(cset))[0] | 334 repo.changelog.node(cset))[0] |
335 mfest = repo.manifest.readdelta(mfnode) | 335 mfest = repo.manifestlog[mfnode].readdelta() |
336 # store file nodes we must see | 336 # store file nodes we must see |
337 for f, n in mfest.iteritems(): | 337 for f, n in mfest.iteritems(): |
338 needfiles.setdefault(f, set()).add(n) | 338 needfiles.setdefault(f, set()).add(n) |
339 | 339 |
340 # process the files | 340 # process the files |