Patchwork D6190: tests: better document the graft copy case

login
register
mail settings
Submitter phabricator
Date April 3, 2019, 4:53 p.m.
Message ID <differential-rev-PHID-DREV-meyfbrbmagasqigo2eb2-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39462/
State Superseded
Headers show

Comments

phabricator - April 3, 2019, 4:53 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-graft.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
Pierre-Yves David - April 3, 2019, 6:25 p.m.
Thanks looks good to me. Thanks for clarifying the table.

On 4/3/19 6:53 PM, martinvonz (Martin von Zweigbergk) wrote:
> martinvonz created this revision.
> Herald added a subscriber: mercurial-devel.
> Herald added a reviewer: hg-reviewers.
> 
> REPOSITORY
>    rHG Mercurial
> 
> REVISION DETAIL
>    https://phab.mercurial-scm.org/D6190
> 
> AFFECTED FILES
>    tests/test-graft.t
> 
> CHANGE DETAILS
> 
> diff --git a/tests/test-graft.t b/tests/test-graft.t
> --- a/tests/test-graft.t
> +++ b/tests/test-graft.t
> @@ -927,7 +927,20 @@
>   
>   NOTE: This is affected by issue5343, and will need updating when it's fixed
>   
> -Possible cases during a regular graft (when ca is between cta and c2):
> +Consider this topology for a regular graft:
> +
> +o c1
> +|
> +| o c2
> +| |
> +| o ca # stands for "common ancestor"
> +|/
> +o cta # stands for "common topological ancestor"
> +
> +Note that in issue5343, ca==cta.
> +
> +The following table shows the possible cases. Here, "x->y" and, equivalently,
> +"y<-x", where x is an ancestor of y, means that some copy happened from x to y.
>   
>   name | c1<-cta | cta<->ca | ca->c2
>   A.0  |         |          |
> @@ -955,6 +968,8 @@
>   
>   A.4 has a degenerate case a<-b<-a->a, where checkcopies isn't needed at all.
>   A.5 has a special case a<-b<-b->a, which is treated like a<-b->a in a merge.
> +A.5 has issue5343 as a special case.
> +TODO: add test coverage for A.5
>   A.6 has a special case a<-a<-b->a. Here, checkcopies will find a spurious
>   incomplete divergence, which is in fact complete. This is handled later in
>   mergecopies.
> 
> 
> 
> To: martinvonz, #hg-reviewers
> Cc: mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
phabricator - April 3, 2019, 6:26 p.m.
marmoute added a comment.


  Thanks looks good to me. Thanks for clarifying the table.

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers
Cc: marmoute, mercurial-devel

Patch

diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -927,7 +927,20 @@ 
 
 NOTE: This is affected by issue5343, and will need updating when it's fixed
 
-Possible cases during a regular graft (when ca is between cta and c2):
+Consider this topology for a regular graft:
+
+o c1
+|
+| o c2
+| |
+| o ca # stands for "common ancestor"
+|/
+o cta # stands for "common topological ancestor"
+
+Note that in issue5343, ca==cta.
+
+The following table shows the possible cases. Here, "x->y" and, equivalently,
+"y<-x", where x is an ancestor of y, means that some copy happened from x to y.
 
 name | c1<-cta | cta<->ca | ca->c2
 A.0  |         |          |
@@ -955,6 +968,8 @@ 
 
 A.4 has a degenerate case a<-b<-a->a, where checkcopies isn't needed at all.
 A.5 has a special case a<-b<-b->a, which is treated like a<-b->a in a merge.
+A.5 has issue5343 as a special case.
+TODO: add test coverage for A.5
 A.6 has a special case a<-a<-b->a. Here, checkcopies will find a spurious
 incomplete divergence, which is in fact complete. This is handled later in
 mergecopies.