comparison mercurial/revlog.py @ 32868:ef015ba5ba2e

revlog: rename list of nodes from "content" to "nodes" It seems like the reason for "content" is that the variable contains the nodes that the changegroup "contains", see e234eda20984 (revlog: make addgroup returns a list of node contained in the added source, 2012-01-13), but "nodes" seems much clearer.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Jun 2017 13:42:35 -0700
parents 8e9b9f020f95
children 30d0cb279bac
comparison
equal deleted inserted replaced
32867:8e9b9f020f95 32868:ef015ba5ba2e
1852 1852
1853 If ``addrevisioncb`` is defined, it will be called with arguments of 1853 If ``addrevisioncb`` is defined, it will be called with arguments of
1854 this revlog and the node that was added. 1854 this revlog and the node that was added.
1855 """ 1855 """
1856 1856
1857 content = [] 1857 nodes = []
1858 1858
1859 r = len(self) 1859 r = len(self)
1860 end = 0 1860 end = 0
1861 if r: 1861 if r:
1862 end = self.end(r - 1) 1862 end = self.end(r - 1)
1883 cs = chunkdata['cs'] 1883 cs = chunkdata['cs']
1884 deltabase = chunkdata['deltabase'] 1884 deltabase = chunkdata['deltabase']
1885 delta = chunkdata['delta'] 1885 delta = chunkdata['delta']
1886 flags = chunkdata['flags'] or REVIDX_DEFAULT_FLAGS 1886 flags = chunkdata['flags'] or REVIDX_DEFAULT_FLAGS
1887 1887
1888 content.append(node) 1888 nodes.append(node)
1889 1889
1890 link = linkmapper(cs) 1890 link = linkmapper(cs)
1891 if node in self.nodemap: 1891 if node in self.nodemap:
1892 # this can happen if two branches make the same change 1892 # this can happen if two branches make the same change
1893 chain = node 1893 chain = node
1942 finally: 1942 finally:
1943 if dfh: 1943 if dfh:
1944 dfh.close() 1944 dfh.close()
1945 ifh.close() 1945 ifh.close()
1946 1946
1947 return content 1947 return nodes
1948 1948
1949 def iscensored(self, rev): 1949 def iscensored(self, rev):
1950 """Check if a file revision is censored.""" 1950 """Check if a file revision is censored."""
1951 return False 1951 return False
1952 1952