This revision was automatically updated to reflect the committed changes. Closed by commit rHG8b9b93bf70b1: changegroup: rename dir to tree to avoid shadowing a built-in (authored by indygreg, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D4235?vs=10242&id=10514 REVISION DETAIL https://phab.mercurial-scm.org/D4235 AFFECTED FILES mercurial/changegroup.py CHANGE DETAILS diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -882,10 +882,10 @@ commonrevs, clrevorder, fastpathlinkrev, mfs, fnodes, source, clstate['clrevtomanifestrev']) - for dir, deltas in it: - if dir: + for tree, deltas in it: + if tree: assert self.version == b'03' - chunk = _fileheader(dir) + chunk = _fileheader(tree) size += len(chunk) yield chunk @@ -1026,9 +1026,9 @@ # Callback for the manifest, used to collect linkrevs for filelog # revisions. # Returns the linkrev node (collected in lookupcl). - def makelookupmflinknode(dir, nodes): + def makelookupmflinknode(tree, nodes): if fastpathlinkrev: - assert not dir + assert not tree return mfs.__getitem__ def lookupmflinknode(x): @@ -1048,38 +1048,38 @@ treemanifests to send. """ clnode = nodes[x] - mdata = mfl.get(dir, x).readfast(shallow=True) + mdata = mfl.get(tree, x).readfast(shallow=True) for p, n, fl in mdata.iterentries(): if fl == 't': # subdirectory manifest - subdir = dir + p + '/' - tmfclnodes = tmfnodes.setdefault(subdir, {}) + subtree = tree + p + '/' + tmfclnodes = tmfnodes.setdefault(subtree, {}) tmfclnode = tmfclnodes.setdefault(n, clnode) if clrevorder[clnode] < clrevorder[tmfclnode]: tmfclnodes[n] = clnode else: - f = dir + p + f = tree + p fclnodes = fnodes.setdefault(f, {}) fclnode = fclnodes.setdefault(n, clnode) if clrevorder[clnode] < clrevorder[fclnode]: fclnodes[n] = clnode return clnode return lookupmflinknode while tmfnodes: - dir, nodes = tmfnodes.popitem() - store = dirlog(dir) + tree, nodes = tmfnodes.popitem() + store = dirlog(tree) if not self._filematcher.visitdir(store._dir[:-1] or '.'): prunednodes = [] else: frev, flr = store.rev, store.linkrev prunednodes = [n for n in nodes if flr(frev(n)) not in commonrevs] - if dir and not prunednodes: + if tree and not prunednodes: continue - lookupfn = makelookupmflinknode(dir, nodes) + lookupfn = makelookupmflinknode(tree, nodes) deltas = deltagroup( self._repo, store, prunednodes, False, lookupfn, @@ -1090,7 +1090,7 @@ fullclnodes=self._fullclnodes, precomputedellipsis=self._precomputedellipsis) - yield dir, deltas + yield tree, deltas # The 'source' parameter is useful for extensions def generatefiles(self, changedfiles, commonrevs, source, To: indygreg, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel