Mercurial > hg
comparison mercurial/changegroup.py @ 41445:73a33fe625bb
changegroup: initialize the state variable a bit earlier
This will make the next patch much easier.
Differential Revision: https://phab.mercurial-scm.org/D5732
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 29 Jan 2019 15:43:02 +0300 |
parents | 876494fd967d |
children | fa7d61f9c512 |
comparison
equal
deleted
inserted
replaced
41444:d5357238eda9 | 41445:73a33fe625bb |
---|---|
928 manifests = {} | 928 manifests = {} |
929 mfl = self._repo.manifestlog | 929 mfl = self._repo.manifestlog |
930 changedfiles = set() | 930 changedfiles = set() |
931 clrevtomanifestrev = {} | 931 clrevtomanifestrev = {} |
932 | 932 |
933 state = { | |
934 'clrevorder': clrevorder, | |
935 'manifests': manifests, | |
936 'changedfiles': changedfiles, | |
937 'clrevtomanifestrev': clrevtomanifestrev, | |
938 } | |
939 | |
933 # Callback for the changelog, used to collect changed files and | 940 # Callback for the changelog, used to collect changed files and |
934 # manifest nodes. | 941 # manifest nodes. |
935 # Returns the linkrev node (identity in the changelog case). | 942 # Returns the linkrev node (identity in the changelog case). |
936 def lookupcl(x): | 943 def lookupcl(x): |
937 c = cl.changelogrevision(x) | 944 c = cl.changelogrevision(x) |
967 # Record a complete list of potentially-changed files in | 974 # Record a complete list of potentially-changed files in |
968 # this manifest. | 975 # this manifest. |
969 changedfiles.update(c.files) | 976 changedfiles.update(c.files) |
970 | 977 |
971 return x | 978 return x |
972 | |
973 state = { | |
974 'clrevorder': clrevorder, | |
975 'manifests': manifests, | |
976 'changedfiles': changedfiles, | |
977 'clrevtomanifestrev': clrevtomanifestrev, | |
978 } | |
979 | 979 |
980 gen = deltagroup( | 980 gen = deltagroup( |
981 self._repo, cl, nodes, True, lookupcl, | 981 self._repo, cl, nodes, True, lookupcl, |
982 self._forcedeltaparentprev, | 982 self._forcedeltaparentprev, |
983 ellipses=self._ellipses, | 983 ellipses=self._ellipses, |