Patchwork [RFC] help: align description of 'base rev' with reality [issue5488]

login
register
mail settings
Submitter Kim Alvefur
Date Feb. 28, 2017, 2:33 p.m.
Message ID <397c0aa1cd18439d2ce9.1488292416@carcharodon.home.zash.se>
Download mbox | patch
Permalink /patch/18840/
State Accepted
Headers show

Comments

Kim Alvefur - Feb. 28, 2017, 2:33 p.m.
# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1488291548 -3600
#      Tue Feb 28 15:19:08 2017 +0100
# Node ID 397c0aa1cd18439d2ce90a68cd5737fb8dafab49
# Parent  a185b903bda3c64678d1f9399bfa0be8d326dbff
help: align description of 'base rev' with reality [issue5488]

The text about revlogs seems to be wrong about -1 being used to indicate
the start of a delta chain. Attempt to correct this.
Augie Fackler - March 7, 2017, 6:02 p.m.
On Tue, Feb 28, 2017 at 03:33:36PM +0100, Kim Alvefur wrote:
> # HG changeset patch
> # User Kim Alvefur <zash@zash.se>
> # Date 1488291548 -3600
> #      Tue Feb 28 15:19:08 2017 +0100
> # Node ID 397c0aa1cd18439d2ce90a68cd5737fb8dafab49
> # Parent  a185b903bda3c64678d1f9399bfa0be8d326dbff
> help: align description of 'base rev' with reality [issue5488]

Confirmed by reading the code this is correct. Very nice catch.

>
> The text about revlogs seems to be wrong about -1 being used to indicate
> the start of a delta chain. Attempt to correct this.
>
> diff -r a185b903bda3 -r 397c0aa1cd18 mercurial/help/internals/revlogs.txt
> --- a/mercurial/help/internals/revlogs.txt	Tue Feb 21 18:22:07 2017 +0100
> +++ b/mercurial/help/internals/revlogs.txt	Tue Feb 28 15:19:08 2017 +0100
> @@ -108,9 +108,9 @@ 12-15 (4 bytes)
>
>  16-19 (4 bytes)
>     Base or previous revision this revision's delta was produced against.
> -   -1 means this revision holds full text (as opposed to a delta).
> -   For generaldelta repos, this is the previous revision in the delta
> -   chain. For non-generaldelta repos, this is the base or first
> +   This revision holds full text (as opposed to a delta) if it points to
> +   itself. For generaldelta repos, this is the previous revision in the
> +   delta chain. For non-generaldelta repos, this is the base or first
>     revision in the delta chain.
>
>  20-23 (4 bytes)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Jun Wu - March 7, 2017, 9:55 p.m.
Excerpts from Augie Fackler's message of 2017-03-07 13:02:18 -0500:
> On Tue, Feb 28, 2017 at 03:33:36PM +0100, Kim Alvefur wrote:
> > # HG changeset patch
> > # User Kim Alvefur <zash@zash.se>
> > # Date 1488291548 -3600
> > #      Tue Feb 28 15:19:08 2017 +0100
> > # Node ID 397c0aa1cd18439d2ce90a68cd5737fb8dafab49
> > # Parent  a185b903bda3c64678d1f9399bfa0be8d326dbff
> > help: align description of 'base rev' with reality [issue5488]
> 
> Confirmed by reading the code this is correct. Very nice catch.

AFAIK indygreg did a same fix in his doc update patches.

Patch

diff -r a185b903bda3 -r 397c0aa1cd18 mercurial/help/internals/revlogs.txt
--- a/mercurial/help/internals/revlogs.txt	Tue Feb 21 18:22:07 2017 +0100
+++ b/mercurial/help/internals/revlogs.txt	Tue Feb 28 15:19:08 2017 +0100
@@ -108,9 +108,9 @@  12-15 (4 bytes)
 
 16-19 (4 bytes)
    Base or previous revision this revision's delta was produced against.
-   -1 means this revision holds full text (as opposed to a delta).
-   For generaldelta repos, this is the previous revision in the delta
-   chain. For non-generaldelta repos, this is the base or first
+   This revision holds full text (as opposed to a delta) if it points to
+   itself. For generaldelta repos, this is the previous revision in the
+   delta chain. For non-generaldelta repos, this is the base or first
    revision in the delta chain.
 
 20-23 (4 bytes)