##// END OF EJS Templates
graphmod: fix seen state handling for > 2 parents (issue5174)...
Martijn Pieters -
r28998:f303b569 stable
parent child Browse files
Show More
@@ -401,6 +401,7 b' def asciiedges(type, char, lines, state,'
401 edges = [(nodeidx, nextseen.index(p))
401 edges = [(nodeidx, nextseen.index(p))
402 for p in knownparents if p != nullrev]
402 for p in knownparents if p != nullrev]
403
403
404 seen[:] = nextseen
404 while len(newparents) > 2:
405 while len(newparents) > 2:
405 # ascii() only knows how to add or remove a single column between two
406 # ascii() only knows how to add or remove a single column between two
406 # calls. Nodes with more than two parents break this constraint so we
407 # calls. Nodes with more than two parents break this constraint so we
@@ -422,7 +423,6 b' def asciiedges(type, char, lines, state,'
422 if len(newparents) > 1:
423 if len(newparents) > 1:
423 edges.append((nodeidx, nodeidx + 1))
424 edges.append((nodeidx, nodeidx + 1))
424 nmorecols = len(nextseen) - ncols
425 nmorecols = len(nextseen) - ncols
425 seen[:] = nextseen
426 # remove current node from edge characters, no longer needed
426 # remove current node from edge characters, no longer needed
427 state['edges'].pop(rev, None)
427 state['edges'].pop(rev, None)
428 yield (type, char, lines, (nodeidx, edges, ncols, nmorecols))
428 yield (type, char, lines, (nodeidx, edges, ncols, nmorecols))
@@ -2736,3 +2736,58 b' behavior with newlines'
2736
2736
2737
2737
2738 $ cd ..
2738 $ cd ..
2739
2740 When inserting extra line nodes to handle more than 2 parents, ensure that
2741 the right node styles are used (issue5174):
2742
2743 $ hg init repo-issue5174
2744 $ cd repo-issue5174
2745 $ echo a > f0
2746 $ hg ci -Aqm 0
2747 $ echo a > f1
2748 $ hg ci -Aqm 1
2749 $ echo a > f2
2750 $ hg ci -Aqm 2
2751 $ hg co ".^"
2752 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2753 $ echo a > f3
2754 $ hg ci -Aqm 3
2755 $ hg co ".^^"
2756 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
2757 $ echo a > f4
2758 $ hg ci -Aqm 4
2759 $ hg merge -r 2
2760 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2761 (branch merge, don't forget to commit)
2762 $ hg ci -qm 5
2763 $ hg merge -r 3
2764 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2765 (branch merge, don't forget to commit)
2766 $ hg ci -qm 6
2767 $ hg log -G -r '0 | 1 | 2 | 6'
2768 @ changeset: 6:851fe89689ad
2769 :\ tag: tip
2770 : : parent: 5:4f1e3cf15f5d
2771 : : parent: 3:b74ba7084d2d
2772 : : user: test
2773 : : date: Thu Jan 01 00:00:00 1970 +0000
2774 : : summary: 6
2775 : :
2776 : \
2777 : :\
2778 : o : changeset: 2:3e6599df4cce
2779 : :/ user: test
2780 : : date: Thu Jan 01 00:00:00 1970 +0000
2781 : : summary: 2
2782 : :
2783 : o changeset: 1:bd9a55143933
2784 :/ user: test
2785 : date: Thu Jan 01 00:00:00 1970 +0000
2786 : summary: 1
2787 :
2788 o changeset: 0:870a5edc339c
2789 user: test
2790 date: Thu Jan 01 00:00:00 1970 +0000
2791 summary: 0
2792
2793
General Comments 0
You need to be logged in to leave comments. Login now