mercurial/changegroup.py
changeset 39237 3634ed953a42
parent 39236 a79279a21b0a
child 39238 cc957b9dc335
equal deleted inserted replaced
39236:a79279a21b0a 39237:3634ed953a42
   951 
   951 
   952         # Callback for the changelog, used to collect changed files and
   952         # Callback for the changelog, used to collect changed files and
   953         # manifest nodes.
   953         # manifest nodes.
   954         # Returns the linkrev node (identity in the changelog case).
   954         # Returns the linkrev node (identity in the changelog case).
   955         def lookupcl(x):
   955         def lookupcl(x):
   956             c = cl.read(x)
   956             c = cl.changelogrevision(x)
   957             clrevorder[x] = len(clrevorder)
   957             clrevorder[x] = len(clrevorder)
   958 
   958 
   959             if self._ellipses:
   959             if self._ellipses:
   960                 # Only update mfs if x is going to be sent. Otherwise we
   960                 # Only update mfs if x is going to be sent. Otherwise we
   961                 # end up with bogus linkrevs specified for manifests and
   961                 # end up with bogus linkrevs specified for manifests and
   962                 # we skip some manifest nodes that we should otherwise
   962                 # we skip some manifest nodes that we should otherwise
   963                 # have sent.
   963                 # have sent.
   964                 if (x in self._fullclnodes
   964                 if (x in self._fullclnodes
   965                     or cl.rev(x) in self._precomputedellipsis):
   965                     or cl.rev(x) in self._precomputedellipsis):
   966                     n = c[0]
   966 
       
   967                     manifestnode = c.manifest
   967                     # Record the first changeset introducing this manifest
   968                     # Record the first changeset introducing this manifest
   968                     # version.
   969                     # version.
   969                     mfs.setdefault(n, x)
   970                     mfs.setdefault(manifestnode, x)
   970                     # Set this narrow-specific dict so we have the lowest
   971                     # Set this narrow-specific dict so we have the lowest
   971                     # manifest revnum to look up for this cl revnum. (Part of
   972                     # manifest revnum to look up for this cl revnum. (Part of
   972                     # mapping changelog ellipsis parents to manifest ellipsis
   973                     # mapping changelog ellipsis parents to manifest ellipsis
   973                     # parents)
   974                     # parents)
   974                     clrevtomanifestrev.setdefault(cl.rev(x), mfl.rev(n))
   975                     clrevtomanifestrev.setdefault(
       
   976                         cl.rev(x), mfl.rev(manifestnode))
   975                 # We can't trust the changed files list in the changeset if the
   977                 # We can't trust the changed files list in the changeset if the
   976                 # client requested a shallow clone.
   978                 # client requested a shallow clone.
   977                 if self._isshallow:
   979                 if self._isshallow:
   978                     changedfiles.update(mfl[c[0]].read().keys())
   980                     changedfiles.update(mfl[c.manifest].read().keys())
   979                 else:
   981                 else:
   980                     changedfiles.update(c[3])
   982                     changedfiles.update(c.files)
   981             else:
   983             else:
   982 
       
   983                 n = c[0]
       
   984                 # record the first changeset introducing this manifest version
   984                 # record the first changeset introducing this manifest version
   985                 mfs.setdefault(n, x)
   985                 mfs.setdefault(c.manifest, x)
   986                 # Record a complete list of potentially-changed files in
   986                 # Record a complete list of potentially-changed files in
   987                 # this manifest.
   987                 # this manifest.
   988                 changedfiles.update(c[3])
   988                 changedfiles.update(c.files)
   989 
   989 
   990             return x
   990             return x
   991 
   991 
   992         state = {
   992         state = {
   993             'clrevorder': clrevorder,
   993             'clrevorder': clrevorder,