Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG3b581ad59459: simplemerge: disable a pytype error where it's just confused
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
| indygreg |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/simplemerge.py (14 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 0e5b9a005456 | 93599651b3f4 | Augie Fackler | Nov 6 2019, 3:42 PM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 |
| Lines where both A and B have made the same changes at the beginning | Lines where both A and B have made the same changes at the beginning | ||||
| or the end of each merge region are eliminated from the conflict | or the end of each merge region are eliminated from the conflict | ||||
| region and are instead considered the same. | region and are instead considered the same. | ||||
| """ | """ | ||||
| for region in merge_regions: | for region in merge_regions: | ||||
| if region[0] != b"conflict": | if region[0] != b"conflict": | ||||
| yield region | yield region | ||||
| continue | continue | ||||
| issue, z1, z2, a1, a2, b1, b2 = region | # pytype thinks this tuple contains only 3 things, but | ||||
| # that's clearly not true because this code successfully | |||||
| # executes. It might be wise to rework merge_regions to be | |||||
| # some kind of attrs type. | |||||
| ( | |||||
| issue, | |||||
| z1, | |||||
| z2, | |||||
| a1, | |||||
| a2, | |||||
| b1, | |||||
| b2, | |||||
| ) = region # pytype: disable=bad-unpacking | |||||
| alen = a2 - a1 | alen = a2 - a1 | ||||
| blen = b2 - b1 | blen = b2 - b1 | ||||
| # find matches at the front | # find matches at the front | ||||
| ii = 0 | ii = 0 | ||||
| while ( | while ( | ||||
| ii < alen and ii < blen and self.a[a1 + ii] == self.b[b1 + ii] | ii < alen and ii < blen and self.a[a1 + ii] == self.b[b1 + ii] | ||||
| ): | ): | ||||