comparison tests/test-strip.t @ 33558:0103e7187237

drawdag: include files from both parents in merge commits Consider a graph like this: D |\ B C |/ A drawdag will add a file called A in commit A, file B in B, file C in C. That's fine and expected. In merge commits like D, I would expect the files and their contents to be taken from the parent commits, so commit D in this example would have files A, B, and C. However, drawdag will instead add the file D compared to the first parent. Depending on whether B or C got a smaller nodeid, the contents of D would be {A, B, D} or {A, C, D}. This patch changes it to to be {A, B, C}. Differential Revision: https://phab.mercurial-scm.org/D92
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 14 Jul 2017 22:32:58 -0700
parents e07c5740eaaa
children b5d7e7d5c573 6c1a9fd8361b
comparison
equal deleted inserted replaced
33557:875b054e5b95 33558:0103e7187237
972 > repair.delayedstrip(ui, repo, getnodes('G+H+Z'), 'I') 972 > repair.delayedstrip(ui, repo, getnodes('G+H+Z'), 'I')
973 > commands.commit(ui, repo, message='J', date='0 0') 973 > commands.commit(ui, repo, message='J', date='0 0')
974 > EOF 974 > EOF
975 $ hg log -r . -T '\n' --config extensions.t=$TESTTMP/delayedstrip.py 975 $ hg log -r . -T '\n' --config extensions.t=$TESTTMP/delayedstrip.py
976 warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22 976 warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22
977 saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-81fa23b0-I.hg (glob) 977 saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg (glob)
978 978
979 $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)' 979 $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)'
980 @ 6:2f2d51af6205 J 980 @ 6:2f2d51af6205 J
981 | 981 |
982 o 3:08ebfeb61bac I 982 o 3:08ebfeb61bac I
1028 saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg (glob) 1028 saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg (glob)
1029 1029
1030 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' 1030 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1031 o 8:1473d4b996d1 G2 b-F@divergent3 b-G 1031 o 8:1473d4b996d1 G2 b-F@divergent3 b-G
1032 | 1032 |
1033 | o 7:d94e89b773b6 F2 b-F 1033 | o 7:d11b3456a873 F2 b-F
1034 | | 1034 | |
1035 | o 5:7fe5bac4c918 H 1035 | o 5:5cb05ba470a7 H
1036 |/| 1036 |/|
1037 | o 3:7fb047a69f22 E b-F@divergent1 1037 | o 3:7fb047a69f22 E b-F@divergent1
1038 | | 1038 | |
1039 | | o 6:7c78f703e465 D2 b-D 1039 | | o 6:7c78f703e465 D2 b-D
1040 | | | 1040 | | |
1048 1048
1049 $ hg bookmark 1049 $ hg bookmark
1050 b-B 0:426bada5c675 1050 b-B 0:426bada5c675
1051 b-C 0:426bada5c675 1051 b-C 0:426bada5c675
1052 b-D 6:7c78f703e465 1052 b-D 6:7c78f703e465
1053 b-F 7:d94e89b773b6 1053 b-F 7:d11b3456a873
1054 b-F@divergent1 3:7fb047a69f22 1054 b-F@divergent1 3:7fb047a69f22
1055 b-F@divergent3 8:1473d4b996d1 1055 b-F@divergent3 8:1473d4b996d1
1056 b-G 8:1473d4b996d1 1056 b-G 8:1473d4b996d1
1057 b-I 0:426bada5c675 1057 b-I 0:426bada5c675
1058 b-Z -1:000000000000 1058 b-Z -1:000000000000
1071 1071
1072 $ rm .hg/localtags 1072 $ rm .hg/localtags
1073 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' 1073 $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
1074 o 12:1473d4b996d1 G2 b-F@divergent3 b-G 1074 o 12:1473d4b996d1 G2 b-F@divergent3 b-G
1075 | 1075 |
1076 | o 11:d94e89b773b6 F2 b-F 1076 | o 11:d11b3456a873 F2 b-F
1077 | | 1077 | |
1078 | o 8:7fe5bac4c918 H 1078 | o 8:5cb05ba470a7 H
1079 |/| 1079 |/|
1080 | o 4:7fb047a69f22 E b-F@divergent1 1080 | o 4:7fb047a69f22 E b-F@divergent1
1081 | | 1081 | |
1082 | | o 10:7c78f703e465 D2 b-D 1082 | | o 10:7c78f703e465 D2 b-D
1083 | | | 1083 | | |
1089 / 1089 /
1090 o 0:426bada5c675 A b-B b-C b-I 1090 o 0:426bada5c675 A b-B b-C b-I
1091 1091
1092 $ hg debugobsolete 1092 $ hg debugobsolete
1093 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'} 1093 1fc8102cda6204549f031015641606ccf5513ec3 1473d4b996d1d1b121de6b39fab6a04fbf9d873e 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'}
1094 64a8289d249234b9886244d379f15e6b650b28e3 d94e89b773b67e72642a931159ada8d1a9246998 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'} 1094 64a8289d249234b9886244d379f15e6b650b28e3 d11b3456a873daec7c7bc53e5622e8df6d741bd2 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'}
1095 f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'} 1095 f585351a92f85104bff7c284233c338b10eb1df7 7c78f703e465d73102cc8780667ce269c5208a40 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'}
1096 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'} 1096 48b9aae0607f43ff110d84e6883c151942add5ab 0 {0000000000000000000000000000000000000000} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'}
1097 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'} 1097 112478962961147124edd43549aedd1a335e44bf 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'}
1098 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'} 1098 08ebfeb61bac6e3f12079de774d285a0d6689eba 0 {426bada5c67598ca65036d57d9e4b64b0c1ce7a0} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'}
1099 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'} 1099 26805aba1e600a82e93661149f2313866a221a7b 0 {112478962961147124edd43549aedd1a335e44bf} (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'replace', 'user': 'test'}