Mercurial > hg
comparison tests/test-graft.t @ 42055:b9e5f3853a97
tests: better document the graft copy case
Differential Revision: https://phab.mercurial-scm.org/D6190
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 03 Apr 2019 09:38:08 -0700 |
parents | 08dd462ea782 |
children | 3a7efcbdf288 |
comparison
equal
deleted
inserted
replaced
42054:399ed3e86a49 | 42055:b9e5f3853a97 |
---|---|
925 Graft from behind a move or rename | 925 Graft from behind a move or rename |
926 ================================== | 926 ================================== |
927 | 927 |
928 NOTE: This is affected by issue5343, and will need updating when it's fixed | 928 NOTE: This is affected by issue5343, and will need updating when it's fixed |
929 | 929 |
930 Possible cases during a regular graft (when ca is between cta and c2): | 930 Consider this topology for a regular graft: |
931 | |
932 o c1 | |
933 | | |
934 | o c2 | |
935 | | | |
936 | o ca # stands for "common ancestor" | |
937 |/ | |
938 o cta # stands for "common topological ancestor" | |
939 | |
940 Note that in issue5343, ca==cta. | |
941 | |
942 The following table shows the possible cases. Here, "x->y" and, equivalently, | |
943 "y<-x", where x is an ancestor of y, means that some copy happened from x to y. | |
931 | 944 |
932 name | c1<-cta | cta<->ca | ca->c2 | 945 name | c1<-cta | cta<->ca | ca->c2 |
933 A.0 | | | | 946 A.0 | | | |
934 A.1 | X | | | 947 A.1 | X | | |
935 A.2 | | X | | 948 A.2 | | X | |
953 incomplete rename into a divergence. | 966 incomplete rename into a divergence. |
954 Finally, A.6 records a divergence entirely in the c2 pass. | 967 Finally, A.6 records a divergence entirely in the c2 pass. |
955 | 968 |
956 A.4 has a degenerate case a<-b<-a->a, where checkcopies isn't needed at all. | 969 A.4 has a degenerate case a<-b<-a->a, where checkcopies isn't needed at all. |
957 A.5 has a special case a<-b<-b->a, which is treated like a<-b->a in a merge. | 970 A.5 has a special case a<-b<-b->a, which is treated like a<-b->a in a merge. |
971 A.5 has issue5343 as a special case. | |
972 TODO: add test coverage for A.5 | |
958 A.6 has a special case a<-a<-b->a. Here, checkcopies will find a spurious | 973 A.6 has a special case a<-a<-b->a. Here, checkcopies will find a spurious |
959 incomplete divergence, which is in fact complete. This is handled later in | 974 incomplete divergence, which is in fact complete. This is handled later in |
960 mergecopies. | 975 mergecopies. |
961 A.7 has 4 special cases: a<-b<-a->b (the "ping-pong" case), a<-b<-c->b, | 976 A.7 has 4 special cases: a<-b<-a->b (the "ping-pong" case), a<-b<-c->b, |
962 a<-b<-a->c and a<-b<-c->a. Of these, only the "ping-pong" case is interesting, | 977 a<-b<-a->c and a<-b<-c->a. Of these, only the "ping-pong" case is interesting, |