Mercurial > public > mercurial-scm > hg
comparison tests/test-annotate.py @ 34433:2f5a135b2b04
annotate: track whether a particular annotation was the result of a skip
We're going to expose this information in the UI in an upcoming patch.
Differential Revision: https://phab.mercurial-scm.org/D899
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 02 Oct 2017 02:34:47 -0700 |
parents | 2e32c6a31cc7 |
children | cf887d601014 |
comparison
equal
deleted
inserted
replaced
34432:2e32c6a31cc7 | 34433:2f5a135b2b04 |
---|---|
78 childann = decorate(childdata, childfctx) | 78 childann = decorate(childdata, childfctx) |
79 childann = _annotatepair([p1ann, p2ann], childfctx, childann, True, | 79 childann = _annotatepair([p1ann, p2ann], childfctx, childann, True, |
80 diffopts) | 80 diffopts) |
81 self.assertEqual(childann[0], [ | 81 self.assertEqual(childann[0], [ |
82 annotateline('old', 1), | 82 annotateline('old', 1), |
83 annotateline('old', 2), | 83 annotateline('old', 2, True), |
84 # note that this line was carried over from earlier so it is *not* | |
85 # marked skipped | |
84 annotateline('p2', 2), | 86 annotateline('p2', 2), |
85 annotateline('p2', 2), | 87 annotateline('p2', 2, True), |
86 annotateline('p2', 3), | 88 annotateline('p2', 3), |
87 ]) | 89 ]) |
88 | 90 |
89 childann = decorate(childdata, childfctx) | 91 childann = decorate(childdata, childfctx) |
90 childann = _annotatepair([p2ann, p1ann], childfctx, childann, True, | 92 childann = _annotatepair([p2ann, p1ann], childfctx, childann, True, |
91 diffopts) | 93 diffopts) |
92 self.assertEqual(childann[0], [ | 94 self.assertEqual(childann[0], [ |
93 annotateline('old', 1), | 95 annotateline('old', 1), |
94 annotateline('old', 2), | 96 annotateline('old', 2, True), |
95 annotateline('p1', 3), | 97 annotateline('p1', 3), |
96 annotateline('p1', 3), | 98 annotateline('p1', 3, True), |
97 annotateline('p2', 3), | 99 annotateline('p2', 3), |
98 ]) | 100 ]) |
99 | 101 |
100 if __name__ == '__main__': | 102 if __name__ == '__main__': |
101 import silenttestrunner | 103 import silenttestrunner |