##// END OF EJS Templates
context: add an assertion checking linerange consistency in blockdescendants()...
Denis Laxalde -
r31991:55987fc8 default
parent child Browse files
Show More
@@ -1226,6 +1226,12 b' def blockdescendants(fctx, fromline, tol'
1226 continue
1226 continue
1227 inrangep, linerange1 = _changesrange(c, p, linerange2, diffopts)
1227 inrangep, linerange1 = _changesrange(c, p, linerange2, diffopts)
1228 inrange = inrange or inrangep
1228 inrange = inrange or inrangep
1229 # If revision 'i' has been seen (it's a merge), we assume that its
1230 # line range is the same independently of which parents was used
1231 # to compute it.
1232 assert i not in seen or seen[i][1] == linerange1, (
1233 'computed line range for %s is not consistent between '
1234 'ancestor branches' % c)
1229 seen[i] = c, linerange1
1235 seen[i] = c, linerange1
1230 if inrange:
1236 if inrange:
1231 yield c, linerange1
1237 yield c, linerange1
@@ -606,7 +606,7 b' we follow all branches in descending dir'
606 $ mv baz.new baz
606 $ mv baz.new baz
607 $ hg ci -m 'baz:3->+3'
607 $ hg ci -m 'baz:3->+3'
608 created new head
608 created new head
609 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 3:5, startrev=16, descend=True)' --graph
609 $ hg log -T '{rev}: {desc}\n' -r 'followlines(baz, 2:5, startrev=16, descend=True)' --graph
610 @ 29: baz:3->+3
610 @ 29: baz:3->+3
611 :
611 :
612 : o 26: baz:3+->3-
612 : o 26: baz:3+->3-
@@ -615,10 +615,11 b' we follow all branches in descending dir'
615 :/
615 :/
616 o 20: baz:4
616 o 20: baz:4
617 |\
617 |\
618 | ~
618 | o 19: baz:3
619 o 19: baz:3
619 |/
620 |
620 o 18: baz:2
621 ~
621 |\
622 ~ ~
622
623
623 check error cases
624 check error cases
624 $ hg up 23 --quiet
625 $ hg up 23 --quiet
General Comments 0
You need to be logged in to leave comments. Login now