##// END OF EJS Templates
upgrade-repo: colorize some of the output...
marmoute -
r44244:91007890 default draft
parent child Browse files
Show More
@@ -145,6 +145,9 b' except ImportError:'
145 b'status.unknown': b'magenta bold underline',
145 b'status.unknown': b'magenta bold underline',
146 b'tags.normal': b'green',
146 b'tags.normal': b'green',
147 b'tags.local': b'black bold',
147 b'tags.local': b'black bold',
148 b'upgrade-repo.requirement.preserved': b'cyan',
149 b'upgrade-repo.requirement.added': b'green',
150 b'upgrade-repo.requirement.removed': b'red',
148 }
151 }
149
152
150
153
@@ -1242,25 +1242,31 b' def upgraderepo('
1242 ui.warn(msg % b', '.join(sorted(incompatible)))
1242 ui.warn(msg % b', '.join(sorted(incompatible)))
1243 revlogs = UPGRADE_ALL_REVLOGS
1243 revlogs = UPGRADE_ALL_REVLOGS
1244
1244
1245 def write_labeled(l, label):
1246 first = True
1247 for r in sorted(l):
1248 if not first:
1249 ui.write(', ')
1250 ui.write(r, label=label)
1251 first = False
1252
1245 def printrequirements():
1253 def printrequirements():
1246 ui.write(_(b'requirements\n'))
1254 ui.write(_(b'requirements\n'))
1247 ui.write(
1255 ui.write(_(b' preserved: '))
1248 _(b' preserved: %s\n')
1256 write_labeled(
1249 % _(b', ').join(sorted(newreqs & repo.requirements))
1257 newreqs & repo.requirements, "upgrade-repo.requirement.preserved"
1250 )
1258 )
1251
1259 ui.write(('\n'))
1260 removed = repo.requirements - newreqs
1252 if repo.requirements - newreqs:
1261 if repo.requirements - newreqs:
1253 ui.write(
1262 ui.write(_(b' removed: '))
1254 _(b' removed: %s\n')
1263 write_labeled(removed, "upgrade-repo.requirement.removed")
1255 % _(b', ').join(sorted(repo.requirements - newreqs))
1264 ui.write(('\n'))
1256 )
1265 added = newreqs - repo.requirements
1257
1266 if added:
1258 if newreqs - repo.requirements:
1267 ui.write(_(b' added: '))
1259 ui.write(
1268 write_labeled(added, "upgrade-repo.requirement.added")
1260 _(b' added: %s\n')
1269 ui.write(('\n'))
1261 % _(b', ').join(sorted(newreqs - repo.requirements))
1262 )
1263
1264 ui.write(b'\n')
1270 ui.write(b'\n')
1265
1271
1266 def printupgradeactions():
1272 def printupgradeactions():
General Comments 0
You need to be logged in to leave comments. Login now