comparison mercurial/manifest.py @ 28207:43edd3003456

treemanifest: rewrite text() using iterentries() This simplifies a bit. Note that the function is only used when manually testing with _treeinmem=True.
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 20 Feb 2016 23:57:21 -0800
parents 8ab91d9290ce
children f7c5c7847b53
comparison
equal deleted inserted replaced
28206:8ab91d9290ce 28207:43edd3003456
859 self._flags[f] = fl 859 self._flags[f] = fl
860 860
861 def text(self, usemanifestv2=False): 861 def text(self, usemanifestv2=False):
862 """Get the full data of this manifest as a bytestring.""" 862 """Get the full data of this manifest as a bytestring."""
863 self._load() 863 self._load()
864 flags = self.flags 864 return _text(self.iterentries(), usemanifestv2)
865 return _text(((f, self[f], flags(f)) for f in self.keys()),
866 usemanifestv2)
867 865
868 def dirtext(self, usemanifestv2=False): 866 def dirtext(self, usemanifestv2=False):
869 """Get the full data of this directory as a bytestring. Make sure that 867 """Get the full data of this directory as a bytestring. Make sure that
870 any submanifests have been written first, so their nodeids are correct. 868 any submanifests have been written first, so their nodeids are correct.
871 """ 869 """