Show More
@@ -469,22 +469,6 b' def ascii(ui, state, type, char, text, c' | |||
|
469 | 469 | while len(text) < len(lines): |
|
470 | 470 | text.append("") |
|
471 | 471 | |
|
472 | if any(len(char) > 1 for char in edgemap.values()): | |
|
473 | # limit drawing an edge to the first or last N lines of the current | |
|
474 | # section the rest of the edge is drawn like a parent line. | |
|
475 | parent = state['styles'][PARENT][-1:] | |
|
476 | def _drawgp(char, i): | |
|
477 | # should a grandparent character be drawn for this line? | |
|
478 | if len(char) < 2: | |
|
479 | return True | |
|
480 | num = int(char[:-1]) | |
|
481 | # either skip first num lines or take last num lines, based on sign | |
|
482 | return -num <= i if num < 0 else (len(lines) - i) <= num | |
|
483 | for i, line in enumerate(lines): | |
|
484 | line[:] = [c[-1:] if _drawgp(c, i) else parent for c in line] | |
|
485 | edgemap.update( | |
|
486 | (e, (c if len(c) < 2 else parent)) for e, c in edgemap.items()) | |
|
487 | ||
|
488 | 472 | # print lines |
|
489 | 473 | indentation_level = max(ncols, ncols + coldiff) |
|
490 | 474 | lines = ["%-*s " % (2 * indentation_level, "".join(line)) for line in lines] |
@@ -3028,12 +3028,14 b' Setting HGPLAIN ignores graphmod styling' | |||
|
3028 | 3028 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
3029 | 3029 | summary: (4) merge two known; one immediate left, one immediate right |
|
3030 | 3030 | |
|
3031 | Draw only part of a grandparent line differently with "<N><char>"; only the | |
|
3032 |
last N lines (for positive N) or everything but the first N lines |
|
|
3033 | negative N) along the current node use the style, the rest of the edge uses | |
|
3034 | the parent edge styling. | |
|
3031 | Previously, one could specify graphstyle.grandparent = <N><char> to draw <char> | |
|
3032 | on only the last N lines (for positive N) or everything but the first N lines | |
|
3033 | (for negative N), with the rest of the edge using the parent edge styling. | |
|
3035 | 3034 | |
|
3036 | Last 3 lines: | |
|
3035 | This was removed, and this test now shows that muliple characters being | |
|
3036 | specified in graphstyle.grandparent aren't treated specially (including in width | |
|
3037 | calculations; there's no specific reason to *avoid* handling the width | |
|
3038 | calculations, but it's difficult to do correctly and efficiently). | |
|
3037 | 3039 | |
|
3038 | 3040 | $ cat << EOF >> $HGRCPATH |
|
3039 | 3041 | > [experimental] |
@@ -3043,77 +3045,77 b' Last 3 lines:' | |||
|
3043 | 3045 | > EOF |
|
3044 | 3046 |
|
|
3045 | 3047 | @ changeset: 36:08a19a744424 |
|
3046 |
|
|
|
3047 |
|
|
|
3048 |
|
|
|
3049 |
|
|
|
3050 |
|
|
|
3051 | . date: Thu Jan 01 00:00:36 1970 +0000 | |
|
3052 | . summary: (36) buggy merge: identical parents | |
|
3053 | . | |
|
3048 | 3. branch: branch | |
|
3049 | 3. tag: tip | |
|
3050 | 3. parent: 35:9159c3644c5e | |
|
3051 | 3. parent: 35:9159c3644c5e | |
|
3052 | 3. user: test | |
|
3053 | 3. date: Thu Jan 01 00:00:36 1970 +0000 | |
|
3054 | 3. summary: (36) buggy merge: identical parents | |
|
3055 | 3. | |
|
3054 | 3056 | o changeset: 32:d06dffa21a31 |
|
3055 | 3057 | !\ parent: 27:886ed638191b |
|
3056 |
! |
|
|
3057 |
! |
|
|
3058 | ! . date: Thu Jan 01 00:00:32 1970 +0000 | |
|
3059 | ! . summary: (32) expand | |
|
3060 | ! . | |
|
3061 |
o |
|
|
3062 |
!\ |
|
|
3063 |
! |
|
|
3064 |
! |
|
|
3065 |
! |
|
|
3066 |
! |
|
|
3067 |
! |
|
|
3068 |
o |
|
|
3058 | ! 3. parent: 31:621d83e11f67 | |
|
3059 | ! 3. user: test | |
|
3060 | ! 3. date: Thu Jan 01 00:00:32 1970 +0000 | |
|
3061 | ! 3. summary: (32) expand | |
|
3062 | ! 3. | |
|
3063 | o 3. changeset: 31:621d83e11f67 | |
|
3064 | !\3. parent: 21:d42a756af44d | |
|
3065 | ! 3. parent: 30:6e11cd4b648f | |
|
3066 | ! 3. user: test | |
|
3067 | ! 3. date: Thu Jan 01 00:00:31 1970 +0000 | |
|
3068 | ! 3. summary: (31) expand | |
|
3069 | ! 3. | |
|
3070 | o 3. changeset: 30:6e11cd4b648f | |
|
3069 | 3071 | !\ \ parent: 28:44ecd0b9ae99 |
|
3070 |
! ~ |
|
|
3071 |
! |
|
|
3072 |
! |
|
|
3073 |
! |
|
|
3072 | ! ~ 3. parent: 29:cd9bb2be7593 | |
|
3073 | ! 3. user: test | |
|
3074 | ! 3. date: Thu Jan 01 00:00:30 1970 +0000 | |
|
3075 | ! 3. summary: (30) expand | |
|
3074 | 3076 | ! / |
|
3075 |
o |
|
|
3077 | o 3. changeset: 28:44ecd0b9ae99 | |
|
3076 | 3078 | !\ \ parent: 1:6db2ef61d156 |
|
3077 |
! ~ |
|
|
3078 |
! |
|
|
3079 |
! |
|
|
3080 |
! |
|
|
3079 | ! ~ 3. parent: 26:7f25b6c2f0b9 | |
|
3080 | ! 3. user: test | |
|
3081 | ! 3. date: Thu Jan 01 00:00:28 1970 +0000 | |
|
3082 | ! 3. summary: (28) merge zero known | |
|
3081 | 3083 | ! / |
|
3082 |
o |
|
|
3084 | o 3. changeset: 26:7f25b6c2f0b9 | |
|
3083 | 3085 | !\ \ parent: 18:1aa84d96232a |
|
3084 |
! ! |
|
|
3085 |
! ! |
|
|
3086 |
! ! |
|
|
3087 |
! ! |
|
|
3088 |
! ! |
|
|
3089 |
! o |
|
|
3090 |
! !\ |
|
|
3091 |
! ! |
|
|
3092 |
! ! |
|
|
3093 |
! ! |
|
|
3094 |
! ! |
|
|
3095 |
! ! |
|
|
3096 |
! o |
|
|
3086 | ! ! 3. parent: 25:91da8ed57247 | |
|
3087 | ! ! 3. user: test | |
|
3088 | ! ! 3. date: Thu Jan 01 00:00:26 1970 +0000 | |
|
3089 | ! ! 3. summary: (26) merge one known; far right | |
|
3090 | ! ! 3. | |
|
3091 | ! o 3. changeset: 25:91da8ed57247 | |
|
3092 | ! !\3. parent: 21:d42a756af44d | |
|
3093 | ! ! 3. parent: 24:a9c19a3d96b7 | |
|
3094 | ! ! 3. user: test | |
|
3095 | ! ! 3. date: Thu Jan 01 00:00:25 1970 +0000 | |
|
3096 | ! ! 3. summary: (25) merge one known; far left | |
|
3097 | ! ! 3. | |
|
3098 | ! o 3. changeset: 24:a9c19a3d96b7 | |
|
3097 | 3099 | ! !\ \ parent: 0:e6eb3150255d |
|
3098 |
! ! ~ |
|
|
3099 |
! ! |
|
|
3100 |
! ! |
|
|
3101 |
! ! |
|
|
3100 | ! ! ~ 3. parent: 23:a01cddf0766d | |
|
3101 | ! ! 3. user: test | |
|
3102 | ! ! 3. date: Thu Jan 01 00:00:24 1970 +0000 | |
|
3103 | ! ! 3. summary: (24) merge one known; immediate right | |
|
3102 | 3104 | ! ! / |
|
3103 |
! o |
|
|
3105 | ! o 3. changeset: 23:a01cddf0766d | |
|
3104 | 3106 | ! !\ \ parent: 1:6db2ef61d156 |
|
3105 |
! ! ~ |
|
|
3106 |
! ! |
|
|
3107 |
! ! |
|
|
3108 |
! ! |
|
|
3107 | ! ! ~ 3. parent: 22:e0d9cccacb5d | |
|
3108 | ! ! 3. user: test | |
|
3109 | ! ! 3. date: Thu Jan 01 00:00:23 1970 +0000 | |
|
3110 | ! ! 3. summary: (23) merge one known; immediate left | |
|
3109 | 3111 | ! ! / |
|
3110 |
! o |
|
|
3111 |
!/ |
|
|
3112 |
! |
|
|
3113 |
! |
|
|
3114 |
! |
|
|
3115 |
! |
|
|
3116 |
! |
|
|
3112 | ! o 3. changeset: 22:e0d9cccacb5d | |
|
3113 | !/3./ parent: 18:1aa84d96232a | |
|
3114 | ! 3. parent: 21:d42a756af44d | |
|
3115 | ! 3. user: test | |
|
3116 | ! 3. date: Thu Jan 01 00:00:22 1970 +0000 | |
|
3117 | ! 3. summary: (22) merge two known; one far left, one far right | |
|
3118 | ! 3. | |
|
3117 | 3119 | ! o changeset: 21:d42a756af44d |
|
3118 | 3120 | ! !\ parent: 19:31ddc2c1573b |
|
3119 | 3121 | ! ! ! parent: 20:d30ed6450e32 |
@@ -3142,7 +3144,8 b' Last 3 lines:' | |||
|
3142 | 3144 | date: Thu Jan 01 00:00:18 1970 +0000 |
|
3143 | 3145 | summary: (18) merge two known; two far left |
|
3144 | 3146 |
|
|
3145 | All but the first 3 lines: | |
|
3147 | (This formerly tested "All but the first 3 lines", but is now showing that it's | |
|
3148 | still not treated any differently): | |
|
3146 | 3149 | |
|
3147 | 3150 | $ cat << EOF >> $HGRCPATH |
|
3148 | 3151 | > [experimental] |
@@ -3152,77 +3155,77 b' All but the first 3 lines:' | |||
|
3152 | 3155 | > EOF |
|
3153 | 3156 | $ hg log -G -r '36:18 & file("a")' -m |
|
3154 | 3157 | @ changeset: 36:08a19a744424 |
|
3155 |
|
|
|
3156 |
|
|
|
3157 | . parent: 35:9159c3644c5e | |
|
3158 | . parent: 35:9159c3644c5e | |
|
3159 | . user: test | |
|
3160 | . date: Thu Jan 01 00:00:36 1970 +0000 | |
|
3161 | . summary: (36) buggy merge: identical parents | |
|
3162 | . | |
|
3158 | -3. branch: branch | |
|
3159 | -3. tag: tip | |
|
3160 | -3. parent: 35:9159c3644c5e | |
|
3161 | -3. parent: 35:9159c3644c5e | |
|
3162 | -3. user: test | |
|
3163 | -3. date: Thu Jan 01 00:00:36 1970 +0000 | |
|
3164 | -3. summary: (36) buggy merge: identical parents | |
|
3165 | -3. | |
|
3163 | 3166 | o changeset: 32:d06dffa21a31 |
|
3164 | 3167 | !\ parent: 27:886ed638191b |
|
3165 |
! |
|
|
3166 | ! . user: test | |
|
3167 | ! . date: Thu Jan 01 00:00:32 1970 +0000 | |
|
3168 | ! . summary: (32) expand | |
|
3169 | ! . | |
|
3170 |
o |
|
|
3171 |
!\ |
|
|
3172 |
! |
|
|
3173 |
! |
|
|
3174 |
! |
|
|
3175 |
! |
|
|
3176 |
! |
|
|
3177 |
o |
|
|
3168 | ! -3. parent: 31:621d83e11f67 | |
|
3169 | ! -3. user: test | |
|
3170 | ! -3. date: Thu Jan 01 00:00:32 1970 +0000 | |
|
3171 | ! -3. summary: (32) expand | |
|
3172 | ! -3. | |
|
3173 | o -3. changeset: 31:621d83e11f67 | |
|
3174 | !\-3. parent: 21:d42a756af44d | |
|
3175 | ! -3. parent: 30:6e11cd4b648f | |
|
3176 | ! -3. user: test | |
|
3177 | ! -3. date: Thu Jan 01 00:00:31 1970 +0000 | |
|
3178 | ! -3. summary: (31) expand | |
|
3179 | ! -3. | |
|
3180 | o -3. changeset: 30:6e11cd4b648f | |
|
3178 | 3181 | !\ \ parent: 28:44ecd0b9ae99 |
|
3179 |
! ~ |
|
|
3180 |
! |
|
|
3181 |
! |
|
|
3182 |
! |
|
|
3182 | ! ~ -3. parent: 29:cd9bb2be7593 | |
|
3183 | ! -3. user: test | |
|
3184 | ! -3. date: Thu Jan 01 00:00:30 1970 +0000 | |
|
3185 | ! -3. summary: (30) expand | |
|
3183 | 3186 | ! / |
|
3184 |
o |
|
|
3187 | o -3. changeset: 28:44ecd0b9ae99 | |
|
3185 | 3188 | !\ \ parent: 1:6db2ef61d156 |
|
3186 |
! ~ |
|
|
3187 |
! |
|
|
3188 |
! |
|
|
3189 |
! |
|
|
3189 | ! ~ -3. parent: 26:7f25b6c2f0b9 | |
|
3190 | ! -3. user: test | |
|
3191 | ! -3. date: Thu Jan 01 00:00:28 1970 +0000 | |
|
3192 | ! -3. summary: (28) merge zero known | |
|
3190 | 3193 | ! / |
|
3191 |
o |
|
|
3194 | o -3. changeset: 26:7f25b6c2f0b9 | |
|
3192 | 3195 | !\ \ parent: 18:1aa84d96232a |
|
3193 |
! ! |
|
|
3194 |
! ! |
|
|
3195 |
! ! |
|
|
3196 |
! ! |
|
|
3197 |
! ! |
|
|
3198 |
! o |
|
|
3199 |
! !\ |
|
|
3200 |
! ! |
|
|
3201 |
! ! |
|
|
3202 |
! ! |
|
|
3203 |
! ! |
|
|
3204 |
! ! |
|
|
3205 |
! o |
|
|
3196 | ! ! -3. parent: 25:91da8ed57247 | |
|
3197 | ! ! -3. user: test | |
|
3198 | ! ! -3. date: Thu Jan 01 00:00:26 1970 +0000 | |
|
3199 | ! ! -3. summary: (26) merge one known; far right | |
|
3200 | ! ! -3. | |
|
3201 | ! o -3. changeset: 25:91da8ed57247 | |
|
3202 | ! !\-3. parent: 21:d42a756af44d | |
|
3203 | ! ! -3. parent: 24:a9c19a3d96b7 | |
|
3204 | ! ! -3. user: test | |
|
3205 | ! ! -3. date: Thu Jan 01 00:00:25 1970 +0000 | |
|
3206 | ! ! -3. summary: (25) merge one known; far left | |
|
3207 | ! ! -3. | |
|
3208 | ! o -3. changeset: 24:a9c19a3d96b7 | |
|
3206 | 3209 | ! !\ \ parent: 0:e6eb3150255d |
|
3207 |
! ! ~ |
|
|
3208 |
! ! |
|
|
3209 |
! ! |
|
|
3210 |
! ! |
|
|
3210 | ! ! ~ -3. parent: 23:a01cddf0766d | |
|
3211 | ! ! -3. user: test | |
|
3212 | ! ! -3. date: Thu Jan 01 00:00:24 1970 +0000 | |
|
3213 | ! ! -3. summary: (24) merge one known; immediate right | |
|
3211 | 3214 | ! ! / |
|
3212 |
! o |
|
|
3215 | ! o -3. changeset: 23:a01cddf0766d | |
|
3213 | 3216 | ! !\ \ parent: 1:6db2ef61d156 |
|
3214 |
! ! ~ |
|
|
3215 |
! ! |
|
|
3216 |
! ! |
|
|
3217 |
! ! |
|
|
3217 | ! ! ~ -3. parent: 22:e0d9cccacb5d | |
|
3218 | ! ! -3. user: test | |
|
3219 | ! ! -3. date: Thu Jan 01 00:00:23 1970 +0000 | |
|
3220 | ! ! -3. summary: (23) merge one known; immediate left | |
|
3218 | 3221 | ! ! / |
|
3219 |
! o |
|
|
3220 |
!/ |
|
|
3221 |
! |
|
|
3222 |
! |
|
|
3223 |
! |
|
|
3224 |
! |
|
|
3225 |
! |
|
|
3222 | ! o -3. changeset: 22:e0d9cccacb5d | |
|
3223 | !/-3./ parent: 18:1aa84d96232a | |
|
3224 | ! -3. parent: 21:d42a756af44d | |
|
3225 | ! -3. user: test | |
|
3226 | ! -3. date: Thu Jan 01 00:00:22 1970 +0000 | |
|
3227 | ! -3. summary: (22) merge two known; one far left, one far right | |
|
3228 | ! -3. | |
|
3226 | 3229 | ! o changeset: 21:d42a756af44d |
|
3227 | 3230 | ! !\ parent: 19:31ddc2c1573b |
|
3228 | 3231 | ! ! ! parent: 20:d30ed6450e32 |
General Comments 0
You need to be logged in to leave comments.
Login now