Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGb9e5f3853a97: tests: better document the graft copy case
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | tests/test-graft.t (17 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Martin von Zweigbergk | Apr 3 2019, 12:38 PM |
|/ | |/ | ||||
o 0 | o 0 | ||||
Graft from behind a move or rename | Graft from behind a move or rename | ||||
================================== | ================================== | ||||
NOTE: This is affected by issue5343, and will need updating when it's fixed | 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 | name | c1<-cta | cta<->ca | ca->c2 | ||||
A.0 | | | | A.0 | | | | ||||
A.1 | X | | | A.1 | X | | | ||||
A.2 | | X | | A.2 | | X | | ||||
A.3 | | | X | A.3 | | | X | ||||
A.4 | X | X | | A.4 | X | X | | ||||
A.5 | X | | X | A.5 | X | | X | ||||
appropriate side of the incomplete divergence, and the result is recorded as a | appropriate side of the incomplete divergence, and the result is recorded as a | ||||
divergence. The code doesn't distinguish at all between these two cases, since | divergence. The code doesn't distinguish at all between these two cases, since | ||||
the end result of them is the same: an incomplete divergence joined with an | the end result of them is the same: an incomplete divergence joined with an | ||||
incomplete rename into a divergence. | incomplete rename into a divergence. | ||||
Finally, A.6 records a divergence entirely in the c2 pass. | Finally, A.6 records a divergence entirely in the c2 pass. | ||||
A.4 has a degenerate case a<-b<-a->a, where checkcopies isn't needed at all. | 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 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 | 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 | incomplete divergence, which is in fact complete. This is handled later in | ||||
mergecopies. | mergecopies. | ||||
A.7 has 4 special cases: a<-b<-a->b (the "ping-pong" case), a<-b<-c->b, | A.7 has 4 special cases: a<-b<-a->b (the "ping-pong" case), a<-b<-c->b, | ||||
a<-b<-a->c and a<-b<-c->a. Of these, only the "ping-pong" case is interesting, | a<-b<-a->c and a<-b<-c->a. Of these, only the "ping-pong" case is interesting, | ||||
the others are fairly trivial (a<-b<-c->b and a<-b<-a->c proceed like the base | the others are fairly trivial (a<-b<-c->b and a<-b<-a->c proceed like the base | ||||
case, a<-b<-c->a is treated the same as a<-b<-b->a). | case, a<-b<-c->a is treated the same as a<-b<-b->a). | ||||