changeset 68:38843a80f378

Local cludge fix for bug 39 - incoming/outgoing showing content anyway https://bitbucket.org/sjl/hg-prompt/issues/39/outgoing-incoming-always-show-the-extra
author IBBoard <dev@ibboard.co.uk>
date Tue, 25 Apr 2017 13:13:36 +0100
parents 2cc6556f8903
children 78b4a74a5452
files prompt.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/prompt.py	Tue Apr 25 12:57:18 2017 +0100
+++ b/prompt.py	Tue Apr 25 13:13:36 2017 +0100
@@ -313,8 +313,8 @@
             if cache_exists:
                 with open(cache) as c:
                     count = len(c.readlines())
-                    if g[1] and count > 0:
-                        return _with_groups(g, str(count))
+                    if g[1]:
+                        return _with_groups(g, str(count)) if count else ''
                     elif g[2]:
                         return _with_groups(g, '0') if not count else ''
                     else: