##// END OF EJS Templates
upgrade-repo: colorize some of the output...
marmoute -
r44257:ad84fc97 default
parent child Browse files
Show More
@@ -145,6 +145,9 b' except ImportError:'
145 145 b'status.unknown': b'magenta bold underline',
146 146 b'tags.normal': b'green',
147 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 1242 ui.warn(msg % b', '.join(sorted(incompatible)))
1243 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(b', ')
1250 ui.write(r, label=label)
1251 first = False
1252
1245 1253 def printrequirements():
1246 1254 ui.write(_(b'requirements\n'))
1247 ui.write(
1248 _(b' preserved: %s\n')
1249 % _(b', ').join(sorted(newreqs & repo.requirements))
1255 ui.write(_(b' preserved: '))
1256 write_labeled(
1257 newreqs & repo.requirements, "upgrade-repo.requirement.preserved"
1250 1258 )
1251
1259 ui.write((b'\n'))
1260 removed = repo.requirements - newreqs
1252 1261 if repo.requirements - newreqs:
1253 ui.write(
1254 _(b' removed: %s\n')
1255 % _(b', ').join(sorted(repo.requirements - newreqs))
1256 )
1257
1258 if newreqs - repo.requirements:
1259 ui.write(
1260 _(b' added: %s\n')
1261 % _(b', ').join(sorted(newreqs - repo.requirements))
1262 )
1263
1262 ui.write(_(b' removed: '))
1263 write_labeled(removed, "upgrade-repo.requirement.removed")
1264 ui.write((b'\n'))
1265 added = newreqs - repo.requirements
1266 if added:
1267 ui.write(_(b' added: '))
1268 write_labeled(added, "upgrade-repo.requirement.added")
1269 ui.write((b'\n'))
1264 1270 ui.write(b'\n')
1265 1271
1266 1272 def printupgradeactions():
General Comments 0
You need to be logged in to leave comments. Login now