Commits

Anonymous committed ad2bec7

Do not print separate line for latest version if it is installed.

Comments (0)

Files changed (1)

pip/commands/search.py

                 dist = pkg_resources.get_distribution(name)
                 logger.indent += 2
                 try:
-                    logger.notify('INSTALLED: %s' % dist.version)
-                    logger.notify('LATEST: %s' % highest_version(hit['versions']))
+                    latest = highest_version(hit['versions'])
+                    if dist.version == latest:
+                        logger.notify('INSTALLED: %s (latest)' % dist.version)
+                    else:
+                        logger.notify('INSTALLED: %s' % dist.version)
+                        logger.notify('LATEST:    %s' % latest)
                 finally:
                     logger.indent -= 2
         except UnicodeEncodeError: