graphmod: update edgemap in-place
The edgemap update was not actually propagated to future asciiedge calls;
update the edge state dictionary in-place instead.
--- a/mercurial/graphmod.py Fri May 06 19:24:25 2016 +0000
+++ b/mercurial/graphmod.py Mon May 16 16:41:26 2016 +0100
@@ -668,8 +668,8 @@
return -num <= i if num < 0 else (len(lines) - i) <= num
for i, line in enumerate(lines):
line[:] = [c[-1] if _drawgp(c, i) else parent for c in line]
- edgemap = dict(
- (e, c if len(c) < 2 else parent) for e, c in edgemap.items())
+ edgemap.update(
+ (e, (c if len(c) < 2 else parent)) for e, c in edgemap.items())
# print lines
indentation_level = max(ncols, ncols + coldiff)
--- a/tests/test-glog.t Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-glog.t Mon May 16 16:41:26 2016 +0100
@@ -3070,58 +3070,58 @@
!\! parent: 21:d42a756af44d
! ! parent: 30:6e11cd4b648f
! ! user: test
- ! . date: Thu Jan 01 00:00:31 1970 +0000
- ! . summary: (31) expand
- ! .
+ ! ! date: Thu Jan 01 00:00:31 1970 +0000
+ ! ! summary: (31) expand
+ ! !
o ! changeset: 30:6e11cd4b648f
!\ \ parent: 28:44ecd0b9ae99
! ~ ! parent: 29:cd9bb2be7593
! ! user: test
- ! . date: Thu Jan 01 00:00:30 1970 +0000
- ! . summary: (30) expand
+ ! ! date: Thu Jan 01 00:00:30 1970 +0000
+ ! ! summary: (30) expand
! /
o ! changeset: 28:44ecd0b9ae99
!\ \ parent: 1:6db2ef61d156
! ~ ! parent: 26:7f25b6c2f0b9
! ! user: test
- ! . date: Thu Jan 01 00:00:28 1970 +0000
- ! . summary: (28) merge zero known
+ ! ! date: Thu Jan 01 00:00:28 1970 +0000
+ ! ! summary: (28) merge zero known
! /
o ! changeset: 26:7f25b6c2f0b9
!\ \ parent: 18:1aa84d96232a
! ! ! parent: 25:91da8ed57247
! ! ! user: test
- ! ! . date: Thu Jan 01 00:00:26 1970 +0000
- ! ! . summary: (26) merge one known; far right
- ! ! .
+ ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
+ ! ! ! summary: (26) merge one known; far right
+ ! ! !
! o ! changeset: 25:91da8ed57247
! !\! parent: 21:d42a756af44d
! ! ! parent: 24:a9c19a3d96b7
! ! ! user: test
- ! ! . date: Thu Jan 01 00:00:25 1970 +0000
- ! ! . summary: (25) merge one known; far left
- ! ! .
+ ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
+ ! ! ! summary: (25) merge one known; far left
+ ! ! !
! o ! changeset: 24:a9c19a3d96b7
! !\ \ parent: 0:e6eb3150255d
! ! ~ ! parent: 23:a01cddf0766d
! ! ! user: test
- ! ! . date: Thu Jan 01 00:00:24 1970 +0000
- ! ! . summary: (24) merge one known; immediate right
+ ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
+ ! ! ! summary: (24) merge one known; immediate right
! ! /
! o ! changeset: 23:a01cddf0766d
! !\ \ parent: 1:6db2ef61d156
! ! ~ ! parent: 22:e0d9cccacb5d
! ! ! user: test
- ! ! . date: Thu Jan 01 00:00:23 1970 +0000
- ! ! . summary: (23) merge one known; immediate left
+ ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
+ ! ! ! summary: (23) merge one known; immediate left
! ! /
! o ! changeset: 22:e0d9cccacb5d
!/!/ parent: 18:1aa84d96232a
! ! parent: 21:d42a756af44d
! ! user: test
- ! . date: Thu Jan 01 00:00:22 1970 +0000
- ! . summary: (22) merge two known; one far left, one far right
- ! .
+ ! ! date: Thu Jan 01 00:00:22 1970 +0000
+ ! ! summary: (22) merge two known; one far left, one far right
+ ! !
! o changeset: 21:d42a756af44d
! !\ parent: 19:31ddc2c1573b
! ! ! parent: 20:d30ed6450e32
@@ -3178,59 +3178,59 @@
o ! changeset: 31:621d83e11f67
!\! parent: 21:d42a756af44d
! ! parent: 30:6e11cd4b648f
- ! . user: test
- ! . date: Thu Jan 01 00:00:31 1970 +0000
- ! . summary: (31) expand
- ! .
+ ! ! user: test
+ ! ! date: Thu Jan 01 00:00:31 1970 +0000
+ ! ! summary: (31) expand
+ ! !
o ! changeset: 30:6e11cd4b648f
!\ \ parent: 28:44ecd0b9ae99
! ~ ! parent: 29:cd9bb2be7593
- ! . user: test
- ! . date: Thu Jan 01 00:00:30 1970 +0000
- ! . summary: (30) expand
+ ! ! user: test
+ ! ! date: Thu Jan 01 00:00:30 1970 +0000
+ ! ! summary: (30) expand
! /
o ! changeset: 28:44ecd0b9ae99
!\ \ parent: 1:6db2ef61d156
! ~ ! parent: 26:7f25b6c2f0b9
- ! . user: test
- ! . date: Thu Jan 01 00:00:28 1970 +0000
- ! . summary: (28) merge zero known
+ ! ! user: test
+ ! ! date: Thu Jan 01 00:00:28 1970 +0000
+ ! ! summary: (28) merge zero known
! /
o ! changeset: 26:7f25b6c2f0b9
!\ \ parent: 18:1aa84d96232a
! ! ! parent: 25:91da8ed57247
- ! ! . user: test
- ! ! . date: Thu Jan 01 00:00:26 1970 +0000
- ! ! . summary: (26) merge one known; far right
- ! ! .
+ ! ! ! user: test
+ ! ! ! date: Thu Jan 01 00:00:26 1970 +0000
+ ! ! ! summary: (26) merge one known; far right
+ ! ! !
! o ! changeset: 25:91da8ed57247
! !\! parent: 21:d42a756af44d
! ! ! parent: 24:a9c19a3d96b7
- ! ! . user: test
- ! ! . date: Thu Jan 01 00:00:25 1970 +0000
- ! ! . summary: (25) merge one known; far left
- ! ! .
+ ! ! ! user: test
+ ! ! ! date: Thu Jan 01 00:00:25 1970 +0000
+ ! ! ! summary: (25) merge one known; far left
+ ! ! !
! o ! changeset: 24:a9c19a3d96b7
! !\ \ parent: 0:e6eb3150255d
! ! ~ ! parent: 23:a01cddf0766d
- ! ! . user: test
- ! ! . date: Thu Jan 01 00:00:24 1970 +0000
- ! ! . summary: (24) merge one known; immediate right
+ ! ! ! user: test
+ ! ! ! date: Thu Jan 01 00:00:24 1970 +0000
+ ! ! ! summary: (24) merge one known; immediate right
! ! /
! o ! changeset: 23:a01cddf0766d
! !\ \ parent: 1:6db2ef61d156
! ! ~ ! parent: 22:e0d9cccacb5d
- ! ! . user: test
- ! ! . date: Thu Jan 01 00:00:23 1970 +0000
- ! ! . summary: (23) merge one known; immediate left
+ ! ! ! user: test
+ ! ! ! date: Thu Jan 01 00:00:23 1970 +0000
+ ! ! ! summary: (23) merge one known; immediate left
! ! /
! o ! changeset: 22:e0d9cccacb5d
!/!/ parent: 18:1aa84d96232a
! ! parent: 21:d42a756af44d
- ! . user: test
- ! . date: Thu Jan 01 00:00:22 1970 +0000
- ! . summary: (22) merge two known; one far left, one far right
- ! .
+ ! ! user: test
+ ! ! date: Thu Jan 01 00:00:22 1970 +0000
+ ! ! summary: (22) merge two known; one far left, one far right
+ ! !
! o changeset: 21:d42a756af44d
! !\ parent: 19:31ddc2c1573b
! ! ! parent: 20:d30ed6450e32