Patchwork [3,of,8] upgrade: rename `_copyrevlogs` to `_clonerevlogs`

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 5, 2019, 4:36 p.m.
Message ID <aa19f478cfdfe781acc1.1565022991@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41152/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 5, 2019, 4:36 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1564248347 -7200
#      Sat Jul 27 19:25:47 2019 +0200
# Node ID aa19f478cfdfe781acc15cd26339644757156355
# Parent  085f8c53d0067f4cbb5ed3b9738ef33dbafa0782
# EXP-Topic upgrade-select
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r aa19f478cfdf
upgrade: rename `_copyrevlogs` to `_clonerevlogs`

The underlying revlog method is named `clone`, keeping the naming consistent
seems clearer. This is motivated to clarify the difference with an (upcoming)
function that simply copy revlog files as is.

Patch

diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -533,7 +533,7 @@  def _revlogfrompath(repo, path):
         #reverse of "/".join(("data", path + ".i"))
         return filelog.filelog(repo.svfs, path[5:-2])
 
-def _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse, forcedeltabothparents):
+def _clonerevlogs(ui, srcrepo, dstrepo, tr, deltareuse, forcedeltabothparents):
     """Copy revlogs between 2 repos."""
     revcount = 0
     srcsize = 0
@@ -745,7 +745,7 @@  def _upgraderepo(ui, srcrepo, dstrepo, r
         deltareuse = revlog.revlog.DELTAREUSEALWAYS
 
     with dstrepo.transaction('upgrade') as tr:
-        _copyrevlogs(ui, srcrepo, dstrepo, tr, deltareuse,
+        _clonerevlogs(ui, srcrepo, dstrepo, tr, deltareuse,
                      're-delta-multibase' in actions)
 
     # Now copy other files in the store directory.