Patchwork [3,of,6] revlog: rename list of nodes from "content" to "nodes"

login
register
mail settings
Submitter via Mercurial-devel
Date June 15, 2017, 10:25 p.m.
Message ID <d3ebf9b15b904c0ac40d.1497565530@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/21415/
State Accepted
Headers show

Comments

via Mercurial-devel - June 15, 2017, 10:25 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1497559355 25200
#      Thu Jun 15 13:42:35 2017 -0700
# Node ID d3ebf9b15b904c0ac40dd8e0553fc31464374635
# Parent  d10d1530971d42bda170afbf5df78935a86e3e9f
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.

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1854,7 +1854,7 @@ 
         this revlog and the node that was added.
         """
 
-        content = []
+        nodes = []
 
         r = len(self)
         end = 0
@@ -1885,7 +1885,7 @@ 
                 delta = chunkdata['delta']
                 flags = chunkdata['flags'] or REVIDX_DEFAULT_FLAGS
 
-                content.append(node)
+                nodes.append(node)
 
                 link = linkmapper(cs)
                 if node in self.nodemap:
@@ -1944,7 +1944,7 @@ 
                 dfh.close()
             ifh.close()
 
-        return content
+        return nodes
 
     def iscensored(self, rev):
         """Check if a file revision is censored."""