Patchwork D10081: changelog: rename parameters to reflect semantics

login
register
mail settings
Submitter phabricator
Date March 1, 2021, 3:55 p.m.
Message ID <differential-rev-PHID-DREV-hrqbu5gcc4nj3cjpbkxo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48396/
State Superseded
Headers show

Comments

phabricator - March 1, 2021, 3:55 p.m.
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  `read` and `readfiles` can be used with a revision just as well, so
  follow the naming convention in revlog to reflect this.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10081

AFFECTED FILES
  mercurial/changelog.py

CHANGE DETAILS




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -507,7 +507,7 @@ 
         if not self._delayed:
             revlog.revlog._enforceinlinesize(self, tr, fp)
 
-    def read(self, node):
+    def read(self, nodeorrev):
         """Obtain data from a parsed changelog revision.
 
         Returns a 6-tuple of:
@@ -523,7 +523,7 @@ 
         ``changelogrevision`` instead, as it is faster for partial object
         access.
         """
-        d, s = self._revisiondata(node)
+        d, s = self._revisiondata(nodeorrev)
         c = changelogrevision(
             d, s, self._copiesstorage == b'changeset-sidedata'
         )
@@ -536,11 +536,11 @@ 
             text, sidedata, self._copiesstorage == b'changeset-sidedata'
         )
 
-    def readfiles(self, node):
+    def readfiles(self, nodeorrev):
         """
         short version of read that only returns the files modified by the cset
         """
-        text = self.revision(node)
+        text = self.revision(nodeorrev)
         if not text:
             return []
         last = text.index(b"\n\n")