Patchwork [1,of,8] debugrevlog: document some of the variable used

login
register
mail settings
Submitter Boris Feld
Date Aug. 14, 2018, 4:39 p.m.
Message ID <370c3f5021dedb80ded4.1534264751@FB-lair>
Download mbox | patch
Permalink /patch/33720/
State Accepted
Headers show

Comments

Boris Feld - Aug. 14, 2018, 4:39 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1532681999 -7200
#      Fri Jul 27 10:59:59 2018 +0200
# Node ID 370c3f5021dedb80ded496d39f76f73facd6b7d3
# Parent  d99468d2b09acc8f5c6c5ce5c1b08b47a742841f
# EXP-Topic sparse-snapshot
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 370c3f5021de
debugrevlog: document some of the variable used

This help to understand the code.
Gregory Szorc - Aug. 14, 2018, 8:49 p.m.
On Tue, Aug 14, 2018 at 9:39 AM, Boris Feld <boris.feld@octobus.net> wrote:

> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1532681999 -7200
> #      Fri Jul 27 10:59:59 2018 +0200
> # Node ID 370c3f5021dedb80ded496d39f76f73facd6b7d3
> # Parent  d99468d2b09acc8f5c6c5ce5c1b08b47a742841f
> # EXP-Topic sparse-snapshot
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 370c3f5021de
> debugrevlog: document some of the variable used
>

Queued. Thanks.


>
> This help to understand the code.
>
> diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
> --- a/mercurial/debugcommands.py
> +++ b/mercurial/debugcommands.py
> @@ -2083,18 +2083,30 @@ def debugrevlog(ui, repo, file_=None, **
>      if not flags:
>          flags = ['(none)']
>
> +    ### tracks merge vs single parent
>      nummerges = 0
> +
> +    ### tracks ways the "delta" are build
> +    # full file content
>      numfull = 0
> +    # delta against previous revision
>      numprev = 0
> +    # delta against first or second parent (not prev)
>      nump1 = 0
>      nump2 = 0
> +    # delta against neither prev nor parents
>      numother = 0
> +    # delta against prev that are also first or second parent
> +    # (details of `numprev`)
>      nump1prev = 0
>      nump2prev = 0
> +
> +    # data about delta chain of each revs
>      chainlengths = []
>      chainbases = []
>      chainspans = []
>
> +    # data about each revision
>      datasize = [None, 0, 0]
>      fullsize = [None, 0, 0]
>      deltasize = [None, 0, 0]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -2083,18 +2083,30 @@  def debugrevlog(ui, repo, file_=None, **
     if not flags:
         flags = ['(none)']
 
+    ### tracks merge vs single parent
     nummerges = 0
+
+    ### tracks ways the "delta" are build
+    # full file content
     numfull = 0
+    # delta against previous revision
     numprev = 0
+    # delta against first or second parent (not prev)
     nump1 = 0
     nump2 = 0
+    # delta against neither prev nor parents
     numother = 0
+    # delta against prev that are also first or second parent
+    # (details of `numprev`)
     nump1prev = 0
     nump2prev = 0
+
+    # data about delta chain of each revs
     chainlengths = []
     chainbases = []
     chainspans = []
 
+    # data about each revision
     datasize = [None, 0, 0]
     fullsize = [None, 0, 0]
     deltasize = [None, 0, 0]