Patchwork [1,of,7] sidedata: rename `encode_copies_sidedata` to `encode_files_sidedata`

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 23, 2020, 9:51 p.m.
Message ID <383317c8b1438d445d8d.1600897910@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/47266/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 23, 2020, 9:51 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1600763255 -7200
#      Tue Sep 22 10:27:35 2020 +0200
# Node ID 383317c8b1438d445d8d16f3fe769492d3d994b1
# Parent  68906595016c9b90107d0c53d49b25ff75b626ae
# EXP-Topic new-metadata-pre
# Available At https://foss.heptapod.net/octobus/mercurial-devel/
#              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 383317c8b143
sidedata: rename `encode_copies_sidedata` to `encode_files_sidedata`

We are storing more than copies information, so lets make it clear.
Pulkit Goyal - Sept. 26, 2020, 10:21 a.m.
On Thu, Sep 24, 2020 at 3:40 AM Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
>
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1600763255 -7200
> #      Tue Sep 22 10:27:35 2020 +0200
> # Node ID 383317c8b1438d445d8d16f3fe769492d3d994b1
> # Parent  68906595016c9b90107d0c53d49b25ff75b626ae
> # EXP-Topic new-metadata-pre
> # Available At https://foss.heptapod.net/octobus/mercurial-devel/
> #              hg pull https://foss.heptapod.net/octobus/mercurial-devel/ -r 383317c8b143
> sidedata: rename `encode_copies_sidedata` to `encode_files_sidedata`
>
> We are storing more than copies information, so lets make it clear.

Looks good to me, queued the series. Many thanks!

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -570,7 +570,7 @@  class changelog(revlog.revlog):
         sortedfiles = sorted(files.touched)
         sidedata = None
         if self._copiesstorage == b'changeset-sidedata':
-            sidedata = metadata.encode_copies_sidedata(files)
+            sidedata = metadata.encode_files_sidedata(files)
 
         if extra:
             extra = encodeextra(extra)
diff --git a/mercurial/metadata.py b/mercurial/metadata.py
--- a/mercurial/metadata.py
+++ b/mercurial/metadata.py
@@ -318,7 +318,7 @@  def decodefileindices(files, data):
         return None
 
 
-def encode_copies_sidedata(files):
+def encode_files_sidedata(files):
     sortedfiles = sorted(files.touched)
     sidedata = {}
     p1copies = files.copied_from_p1